D
D
Dom Alfro2021-02-13 01:14:59
Laravel
Dom Alfro, 2021-02-13 01:14:59

How do I properly form routes in laravel?

Good day to all!
I read the documentation wherever I didn't look. I don’t understand yet why I don’t get data
. Here is the code - it seems that the route is the same, it just adds products.

//shop
Route::get('/shop', '[email protected]');
// shop/products
Route::get('/shop/products', '[email protected]');

The first match works, but the second one, although it finds it, but for some reason the scripts are placed crookedly.
but I understand that this can probably be organized either through regular expressions that I don’t understand how they work in laravel.
or in another way.
Because I have one controller and actions in it, for example, 4. So I don’t know how to implement it.
I’ve already rummaged through everything both on English-language sites and here ... and I watched the videos not where they normally don’t explain

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2021-02-13
@mustang_shelby

The same action is called on both routes
[email protected]
What's so surprising about that?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question