Это видео недоступно.
Сожалеем об этом.
Route Grouping Explained | Laravel 10 Tutorial #23
HTML-код
- Опубликовано: 26 июл 2023
- Laravel 10 route grouping Tutorial
On this episode we cover how to refactor our route files using route grouping and reduce duplicate code.
Playlist of Laravel 10 Tutorial Course :
• Laravel 10 Beginners C...
What is Laravel :
Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model-view-controller architectural pattern and based on Symfony.
en.wikipedia.o...
If you're looking to learn how to authenticate a user using Laravel 10, then this is the video for you! In this tutorial, In this tutorial, we'll create a simple registration form that users will be able to submit.
If you have any questions or problems please leave a comment.
Laravel Blade
Laravel crash course
Laravel Database and crud tutorial
Laravel Login and Authentication
Laravel registration
Thank u so much sir! Well explained
Thanks for watching
PPl like u are so precious fr , Thank u alot man !
VSCode autocompletion suggest
Route::middleware(['auth'])->group(function () {
Route::get('/{idea}/edit', [ideaController::class, "edit"])->name("edit");
Route::put('/{idea}', [ideaController::class, "update"])->name("update");
Route::delete('/{id}', [ideaController::class, "destroy"])->name("destroy");
});
and that worked too!
That is also possible, can use which ever you prefer.
very nice laravel 10 project and lessons, thank you Coding Flick, keep make laravel 10 projects and livewire 3
Thank you for watching. Glad you like the videos.
I have a new set of videos coming for livewire 3 in the next few days.
very nice tutorial
thanks very much
You are welcome
This. Is. 'Holy Bible'
for Laravel
Thank you so much.
Will you show how to deploy the application? BTW, great series!!
Thank you for watching. Will definitely cover deployment at the end of the course.
@@yelocode Nice! Thank you for your service!
Will you use Laravel Forge? Im excited to see how this works!
If not, do you intend to cover it?
Right now, I'm thinking about covering DigitalOcean. But may go ahead and use forge as well since it will make the installation process a lot easier
great! thank you
Couldnt you use Route::resource and make an IdeaController to remove a lot of unnecessary code for the routes
Yes, definitely using Route::resource would reduce all the code and would be a better option. Mainly wanted to focus on route groups on this video. Will very likely cover resource routing on a different video or tips video.
Hi. thanks for your amazing videos. I have a problem, could you help me please? there isn't RouteServiceProvider.php in laravel 11. what should I do?
Hi, I had the same issue as you. I also have Laravel 11. I also managed to solve this issue. So, firstly, as you said, Laravel 11 doesn't have RouteServiceProvider.php. Instead, the same functionality is available in the following file: bootstrap/app.php.
Now, I had to research how to add the new route. Here is the code I used to achieve this. This is what the bootstrap/app.php should return:
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
using: function (Illuminate\Routing\Router $router) {
$router->middleware('web')
->group (base_path('routes/auth.php'));
$router->middleware('web')
->group (base_path('routes/web.php'));
},
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
This worked for me. I hope it works for you. Let me know if you have any issues.
@@ramakrishnadas8723 Thank you so much 💙💙
i just find out that var web is an array so we can just add the path inside:
web: [__DIR__.'/../routes/web.php',__DIR__.'/../routes/auth.php'],
its work for me 🤣