Это видео недоступно.
Сожалеем об этом.

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

Комментарии • 22

  • @kouzokiodin3623
    @kouzokiodin3623 2 месяца назад +1

    Thank u so much sir! Well explained

    • @yelocode
      @yelocode  2 месяца назад

      Thanks for watching

  • @samehfathy5981
    @samehfathy5981 Месяц назад

    PPl like u are so precious fr , Thank u alot man !

  • @Vichion
    @Vichion 8 месяцев назад +1

    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!

    • @yelocode
      @yelocode  8 месяцев назад +1

      That is also possible, can use which ever you prefer.

  • @basilistigris640
    @basilistigris640 Год назад +2

    very nice laravel 10 project and lessons, thank you Coding Flick, keep make laravel 10 projects and livewire 3

    • @yelocode
      @yelocode  Год назад +1

      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.

  • @isaiahsemeton7473
    @isaiahsemeton7473 8 месяцев назад +1

    very nice tutorial
    thanks very much

    • @yelocode
      @yelocode  8 месяцев назад

      You are welcome

  • @TheKuisin
    @TheKuisin 5 месяцев назад

    This. Is. 'Holy Bible'
    for Laravel
    Thank you so much.

  • @lucascavalheri7217
    @lucascavalheri7217 Год назад +2

    Will you show how to deploy the application? BTW, great series!!

    • @yelocode
      @yelocode  Год назад +5

      Thank you for watching. Will definitely cover deployment at the end of the course.

    • @lucascavalheri7217
      @lucascavalheri7217 Год назад +2

      ​@@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?

    • @yelocode
      @yelocode  Год назад

      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

  • @LoneTaha
    @LoneTaha 5 месяцев назад

    great! thank you

  • @echoptic775
    @echoptic775 Год назад +2

    Couldnt you use Route::resource and make an IdeaController to remove a lot of unnecessary code for the routes

    • @yelocode
      @yelocode  Год назад +1

      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.

  • @Iamirkia
    @Iamirkia 4 месяца назад +1

    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?

    • @ramakrishnadas8723
      @ramakrishnadas8723 3 месяца назад +2

      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.

    • @Iamirkia
      @Iamirkia 3 месяца назад +2

      @@ramakrishnadas8723 Thank you so much 💙💙

    • @khairulamin5693
      @khairulamin5693 2 месяца назад

      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 🤣