S
S
Sergey Khlopov2019-09-06 14:39:01
Laravel
Sergey Khlopov, 2019-09-06 14:39:01

How to make the route work for all admin pages?

Hello, please tell me I have the following route:

// отображение страниц админ панели
Route::get('admin/{any?}', 'Admin\[email protected]')->name('admin');

If you follow this path: /admin/categoriesthen it works and the index method returns what you need, and if it doesn’t follow this path /admin/category/create, it shows a 404 page, please tell me, how to make it more correct so that the route responds to all requests from the admin panel? Thank you in advance for your response

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Khlopov, 2019-10-20
@Shlop

Did it like this:
So far, it seems to work as it should
. Documentation at where https://laravel.com/docs/5.8/routing#parameters-re...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question