Каждого. Рад встрече. Мой код ниже.
-контроллер. php
public function admin(Request $request) {
if ($request->ajax()) {
$users = \DB::table('users')->leftJoin('roles', 'users.role_id', '=', 'roles.id')->select('users.id as id', 'roles.name as role_name', 'users.*')->get();
...
return Datatables::of(results)->make();
}
return view('frontend.homepage.admin');
-web. php
Route::prefix("admin")->middleware(["auth:admin"])->group(function(){
Route::get('dashboard', ['as' => 'homepage.admin', 'uses' => 'PagesController@admin']);
});
Но у меня есть одна ошибка, как показано ниже.
{"message": "", "exception": "Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException", "file ":" E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Routing \ RouteCollection. php "," line ": 179," trace ": [{" file ":" E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Routing \ Router. php "," line ": 636," function ":" match "," class ":" Illuminate \ Routing \ RouteCollection "," type ":" -> "}, {" file ":" E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Routing \ Router. php "," line ": 625," function ": "findRoute", "class": "Illuminate \ Routing \ Router", "type": "->"}, {"file": "E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Routing \ Router. php "," line ": 614," function ":" dispatchToRoute "," class ":" Illuminate \ Routing \ Router "," type ":" -> "}, {" file ":" E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Foundation \ Http \ Kernel. php "," строка ": 176," функция ":" d ispatch "," class ":" Illuminate \ Routing \ Router "," type ":" -> "}, {" file ":" E: \ Uniclix_Source \ API \ vendor \ laravel \ framework \ src \ Illuminate \ Routing \ Pipeline. php "," line ": 30," function ":" Illuminate \ Foundation \ Http \ {closure} "," class ":" Illuminate \ Foundation \ Http \ Kernel "," type ":" -> "}
Кто может мне помочь?