Laravel 11 Routing: API, Versioning and Custom Routes

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • Let's discuss a few routing changes in Laravel 11. You would customize the routing files and their settings in the bootstrap/app.php
    Links mentioned:
    - My course "How to Build Laravel 11 API From Scratch" laraveldaily.c...
    - Laravel API Versioning: All You Need To Know About V1/V2 laraveldaily.c...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.c...
    - Filament examples: filamentexampl...
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-...
    - My personal Twitter: / povilaskorop

КОМЕНТАРІ • 30

  • @user-zz5un9ov8j
    @user-zz5un9ov8j 4 місяці тому +4

    You are a life saver. Because of this video I know why my api routes didn't work. They removed it from the autoload in app.php. Thank you sir!

  • @EinLinuus
    @EinLinuus 6 місяців тому +1

    I’m just learning Laravel and your videos are very helpful, great work! Speaking of APIs, I have a video suggestion: Can you make a tutorial on how to generate an OpenAPI spec (+ Swagger UI) for a Laravel Project?

    • @LaravelDaily
      @LaravelDaily  6 місяців тому

      I already have a few videos on API docs generators: www.youtube.com/@LaravelDaily/search?query=openapi
      But not sure which of them are specifically for Swagger. This one is the classic that probably still works: github.com/DarkaOnLine/L5-Swagger

  • @Omar-p9r3c
    @Omar-p9r3c 19 днів тому

    thank you, it works!

  • @k1r0shis-eye-_66
    @k1r0shis-eye-_66 5 місяців тому

    Gracias amigo 🇲🇽🇲🇽

  • @shaabanmwanjoge7100
    @shaabanmwanjoge7100 6 місяців тому +1

    i am a laravel developer for about 8 years i came to find that i most of the project i used to create have some common pattern so i think its time to put them in packages so i decided to write my first package but i get some difficulties on using other package to create my package. i was thinking of a new way to do my project using packages so am wondering if i can get a chance to discuss with you about this new approach of handling my projects. i will be happy to get the chance to talk with you

    • @LaravelDaily
      @LaravelDaily  6 місяців тому

      Sorry I don't have time for such personal consultations. Maybe try putting out more details into Laracasts forum question?

  • @raxmatulloerkinov8488
    @raxmatulloerkinov8488 6 місяців тому +2

    Can you make a video how to use authentication by api, i mean how to create jwt tokens and verify them, adding custom payloads and setting them as global variables for laravel 11. Thanks

    • @LaravelDaily
      @LaravelDaily  6 місяців тому +6

      I just use Laravel Sanctum for authentication, I don't remember when was the last time I worked directly with JWT.

    • @mh5854
      @mh5854 6 місяців тому +1

      Sanctum is using jwt by itself

    • @vivekwah
      @vivekwah 6 місяців тому

      I find passport still better for APIs

    • @mh5854
      @mh5854 6 місяців тому

      @@vivekwah why u think passport is better? Than sanctum

  • @sayfiddinergashev4764
    @sayfiddinergashev4764 5 місяців тому

    Hello Mr Povilas thank you for your videos. Can you do video instruction about laravel reverb package?

    • @LaravelDaily
      @LaravelDaily  5 місяців тому +1

      Planning a full course on that, in a few weeks.

  • @jpandagaming5995
    @jpandagaming5995 5 місяців тому

    save my life as usual

  • @andriusgeciauskas3154
    @andriusgeciauskas3154 6 місяців тому

    geras video dekui!

  • @rashidp-fw8zw
    @rashidp-fw8zw 5 місяців тому

    how to register module routes in laravel 11

  • @eudymercedes6565
    @eudymercedes6565 6 місяців тому

    Hello, I love your videos, I have learned a lot from watching them,
    I am developing an application with Laravel 11 and Livewire 3, currently I have a component called visitors, I have a view that shows the active visitors, when I go to register a new visitor I need to make a query to a third party api from the same view to get the information and then fill the entry visitor form, I am trying to use this route Route::match(['get', 'post'], '/home', [Visitor::class])->name('home') ; but it doesn't work for me, any idea how I can achieve what I want?

    • @LaravelDaily
      @LaravelDaily  6 місяців тому

      I've never used Route::match(), I always use Route::get() or Route::post().
      So not sure why it's not working for you, sorry.

  • @davidmichiels8501
    @davidmichiels8501 5 місяців тому

    What about an api subsomain route ?

    • @LaravelDaily
      @LaravelDaily  5 місяців тому

      Should be the same syntax as Laravel 10

  • @jonwinder6622
    @jonwinder6622 2 місяці тому +1

    Who's here because RouteServiceProvider is no long in 11?

  • @rezahosseinpour1969
    @rezahosseinpour1969 6 місяців тому

    🙏🙏🙏🙏🙏

  • @ArshAudioBooks
    @ArshAudioBooks 6 місяців тому

    can you make a video on how to make a dynamic form where user is allowed to make a table (in bg, user do not know about the table though), then based on the first dynamic form it automatically creates a second form which allows the user to enter details into the form which he created in first stage. meanwhile all this data that he enters in second stage gets automatically displayed in a page to the world. so, please try to do this. i can't find anything related to this in yt. laracasts is a no go. they do not reply

    • @LaravelDaily
      @LaravelDaily  6 місяців тому

      Can you give an example of which fields would be in both forms? I need a real-life example that would be relevant to more people in the audience.

    • @ArshAudioBooks
      @ArshAudioBooks 6 місяців тому

      @@LaravelDaily author, translation (of a book), description about the book. subject, meaning,purport, footnote/ comment, few more blank options. this are available in form 1. whatever i add in form 1 gets into the db and in a different page i can select it based on whatever i entered in first form. so first form is used as the fields of the tables.

    • @LaravelDaily
      @LaravelDaily  6 місяців тому +1

      Oh the first form is for STRUCTURE and then the second form is with those fields? Then it's a HUGELY complex subject, we spent long months to build that logic in QuickAdminPanel for all possible fields and types, sorry I can't just "make a video" on something that took months to build.

    • @ArshAudioBooks
      @ArshAudioBooks 5 місяців тому

      @@LaravelDaily oh yes you get it. but can you provide the quick admin panel you are talking about? or you talking about query builder?

    • @LaravelDaily
      @LaravelDaily  5 місяців тому

      It's our paid closed-source product quickadminpanel.com

  • @ilyasfarawe8216
    @ilyasfarawe8216 5 місяців тому

    Tbh these changes aren't needed.