Laravel Route Grouping: Simple to Very Complex

preview_player
Показать описание
How to organize your Laravel routes if there are dozens of them? In this video, I will show you the tips of grouping.

0:00 Intro
0:28 Resource Controllers
2:31 Partial Resource Controllers
3:24 Add Extra Methods to Resource
4:45 Route Grouping
5:14 Route Group Within a Group
6:04 URL Prefixes
7:02 Controller Namespaces
8:03 Route Names in Groups
9:53 Routes in Separate Files
11:38 Route List with Filters

Related Links:

- - - - -
Рекомендации по теме
Комментарии
Автор

Hi sr Laravel Daily, I want to tahnks you for videos. I learned too much, greetings from Chile

DanielJimenez-igmv
Автор

Thanks to your video, I was able to get some answers while I was shaving )

nvzr
Автор

Thanks Povilas, this helped me solve a problem i had with namespaces

AAlani-uzgm
Автор

I just finished the activity you have in your repository about the routes and I realized that I was half lost, but thanks to that now I know a little more. Thank you very much for your time. I saw this video several times that I did not understand well about the route group 🤯

leslysuarez
Автор

I did not know about apiResource! Legend.

LeigerGaming
Автор

Great tutorial! Will be even better if mentioned on some option methods such as overwrite the default parameter name.

Oda
Автор

Thanks as always, learning day by day thanks to you Povilas!

belce
Автор

Excellent explanations! Thank you a lot!

Mariia-lrvx
Автор

Such a awesome explanation and tutorial from the simple to advance . Thanks

amrullahdev
Автор

Thank you very much for the great explanation sir..

AsankaRubasinghe
Автор

Your explanation is so on point, i really like that, thankyou!

HenryDavidLie
Автор

Awesome, awesome, awesome. Thank you Korop!

Автор

Really nice. I love your practical examples. Keep it up!

nikkolumahang
Автор

I have watched more than 20 videos in just 2 days. This channel is all I was looking for, thank you very much for the effort you put for these videos!

I want to ask something. How would you format your resource routes if some actions have different middlewares than the rest? For example, create is allowed for authenticated users, but edit is allowed for authenticated AND the user must own the resource

upliftingspirit
Автор

If you rewind this video to get one or two concept, thumbs up.

nurudeenqoyyumtimilehin
Автор

It took me a long time to realise that you can have route group WITHOUT prefix & name. I thought it is mandatory.

NebsterSK
Автор

Hi there. How can I divide my routes that share the same method?I have different roles in my application, admis, doctor, management and so on.
I've made a CRUD controller and some methods are allowed and other no by check different roles. How can I reach my scope? I used a Resource controller but I don't know how can I split them.
Thanks.

Rb
Автор

which one is right approach
1. writing auth middleware in route.php
2. writing middleware in controller with construct like this
public function __construct()
{
$this->middleware('auth')->except(['index', 'show']);
}

madaminmj
Автор

Hey Daily What should syntax be the name of folder in Controller. Mean folder name is singular or plural. Like you created folder called Admin. For example I want to create Category or Categories?

samiullah
Автор

i am using laravel 6, jwt and custom role-permission system, now i am working this method. is it best practise? or any suggestion?

/**
* Plane
*/
() {
/**
* Airports
*/
() {
$ct = 'AirportController';


Route::group([
'prefix' => '{id}',
'where' => [
'id' => '[0-9]+'
]], function () use ($ct) {
});
});
});

relliv