S
S
Shane Matte2016-05-17 16:21:26
Laravel
Shane Matte, 2016-05-17 16:21:26

What is the way to separate categories and pages in laravel?

Good evening. How can you separate categories and pages. I add links to the menu, like phones (this is a category), about us (this is a page). When you go to /{page}, you need to somehow determine what it is. Tell me how can this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
topot, 2016-05-17
@topot

Use standard routing
https://laravel.com/docs/5.2/routing
or are you talking about something else?

M
Mokhirjon Naimov, 2016-05-19
@zvermafia

You can split like this:

Route::get('category/{category_id}', '[email protected]');
Route::get('page/{page_id}', '[email protected]');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question