if (auth()->guest()) {
Route::group(['middleware' => 'guest'], function () {
Route::get('/', function () {
return view('layouts/login');
})->name('login');
});
} else {
Route::group(['middleware' => 'auth'], function () {
Route::get('/', function () {
return view('index');
})->name('index');
Route::get('/', function () {
return view('layouts/main');
})->name('main');
Route::get('/profile', function () {
return view('layouts/profile');
})->name('profile');
Route::get('/exchange', function () {
return view('layouts/exchange');
})->name('exchange');
});
}
dump и dd из метода passes не реагирует никак
'orders.*.positions.*.delivery_time'
$this->adminIndex()
public function toArray($request)
{
return $this->collection
->map
->toArray($request, true)
->all();
}
public function toArray($request, $isCollection = false)
<code lang="php">
$posts = App\Post::whereHas('comments', function ($query) {
$query->where('id', 1);
})->get();
</code>
->where(function ($query) {
$query->where('deleted_at', '!=', null)->has('comments');
});
->orWhere('deleted_at', '=', null)