Roufail
Roufail

Reputation: 573

Laravel 5.6 Route

This is the mean problem
I have controllers structures like this 

File Structures

And i am using this syntax to make routes which is worked good for me

web/routes

And i calling url in this way

{{ route('admin.categories.show', [$category->id]) }}

i got this error 

Error

Any Solution ?? thanks in advance guys

Upvotes: 0

Views: 525

Answers (2)

sybear
sybear

Reputation: 7784

When grouping routes, it is possible to namespace them by adding flag as:

Route::group(['prefix' => 'admin', 'as' => 'admin.'], function (){
    Route::resource('categories', 'Admin/CategoryController');
});

Now route('admin.categories.show') should be accessible.

Upvotes: 1

Roufail
Roufail

Reputation: 573

the solution is

{{ route('categories.show', [$category->id]) }}

skip the admin thanks every one .

Upvotes: 0

Related Questions