Laravel Routes: Grouping and Other "Tricks" - Challenge Result

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

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

  • @gdogmalone
    @gdogmalone 3 года назад +13

    Great video, learnt loads more than I thought I would! Love the “use” grouping!
    Sorry to hear about your daughter, hope she is getting better.

    • @LaravelDaily
      @LaravelDaily  3 года назад +4

      Yes she is getting better, at home now for 5 weeks, thanks for the support.

  • @0xshashwat
    @0xshashwat 3 года назад +4

    I use name() instead of as() and that works too. I personally think it's more expressive and straightforward.

  • @thisisthelogic
    @thisisthelogic 3 года назад +2

    I'm learning a lot of new tips with those challenges!

  • @aptechstudent9571
    @aptechstudent9571 3 года назад +1

    Your channel is awesome and very interesting, keep it up.

  • @AddMotionLeb
    @AddMotionLeb 3 года назад +1

    Thanks for your effort and hope your kid is doing better.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Yes she is getting better, at home now for 5 weeks, thanks for the support.

  • @GergelyCsermely
    @GergelyCsermely 3 года назад +1

    Thanks, again new informations. Thanks. I hope Your family is OK.

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

    really insightful video

  • @alexaverkiyev9099
    @alexaverkiyev9099 3 года назад +4

    I think that if you're doing route resourse, you should stick to everything as it is, without changing names of routes and other stuff, otherwise it becomes unreadable mess.
    As to using slugs, I think it's better to decide whether to use slugs instead of ids everywhere for that particular model. In that case there's a Route::bind() method or resolveRouteBinding() method if you want to use it on the model

  • @surflaweb
    @surflaweb 3 года назад

    Great Exercise!

  • @jimishukurow2286
    @jimishukurow2286 3 года назад

    Royal like from me, and send email notification before these challanges

  • @utkukorkmaz
    @utkukorkmaz 3 года назад +1

    Thanks for the challange and the good afford in the videos. They’re all great and inspiring. I hope your daughter gets well soon!
    If you have time, I wonder your opinions about PR#16. I tried to create a new approach.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Interesting approach. But, in my personal opinion, it's unnecessary over-engineering with losing of readability for typical Laravel developers, they would be confused why routes are made very differently from a typical Laravel approach.

  • @siyabdev
    @siyabdev 3 года назад +1

    Your videos are helping a lot. It would be good if you make a video on Laravel Cashier in 2021. 🙏

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Not sure what my video would do that is not written in the official Cashier documentation :)

  • @dakuzful
    @dakuzful 3 года назад +1

    Great movie like always. It is possible to prepare material about returning exception, errors with Controller + Service? I mean the good practice of returning errors with a VueJS and Laravel.

    • @LaravelDaily
      @LaravelDaily  3 года назад

      ruclips.net/video/SlBJrLnyoMk/видео.html maybe this video would help, also search the channel for "exceptions", you will find more videos

  • @Van4kk
    @Van4kk 2 года назад

    Once it is a big project and there are hundreds of routes, in my opinion it will be efficient to separate routes on files and register them inside RouteServiceProvider.
    For ADMIN it will be a file

  • @belce1982
    @belce1982 3 года назад +1

    Thanks as always!

  • @BsiennKhan
    @BsiennKhan 3 года назад +2

    @jeytii My man thank you so much for that shortcut, i tried to search that shortcut but couldn't find any docs or blog. All this is because of Sir Povalis for these challenges. RESPECT

  • @simonwxyz
    @simonwxyz 3 года назад +5

    One thing I noticed is not many people put their method chains on new lines. As such you end up with really long lines for each route, and I noticed you having to scroll sideways a lot in this video still. To me that seems like a problem because it's harder to read, to take the whole route in, and your git diffs will be harder to understand too over time as the routes grow and change. I'd say partly it's just my personal preference to use a lot of newlines, but there's definitely benefits to keeping lines short in this file in particular.

  • @olegkuhalskiy6423
    @olegkuhalskiy6423 3 года назад

    Good evening, how can I implement a JSON Rest API for getting and searching data (with pagination) ?

  • @iordanistsapanidis4021
    @iordanistsapanidis4021 3 года назад

    Is there any code snippet for adding images using polymorphic manytomany with product? E g. For each (files as image){ $product->images->attach($image)}

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

    What is {book : slug} in route parameter and how to use it? Thanks.

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

      It's route model binding: laravel.com/docs/10.x/routing#customizing-the-key

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

      Thanks

  • @konstruktion
    @konstruktion 3 года назад

    Hey!
    Route::middleware(['auth', 'verified'])->group(function () {
    Route::resource('photo', 'PhotosController')->withoutMiddleware('verified');
    });
    Where do you stand on this?

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      I'm ok with this, but personally never had a case where I needed to use it.

  • @shoaibsaqib8951
    @shoaibsaqib8951 3 года назад

    Sir, Please tell us which theme of phpstorm you are using. The code very prominent and easy to readable. I want to use this theme. Please tell us.. Thanks

  • @ekponoambrose1909
    @ekponoambrose1909 3 года назад

    @jeytii great shortcut for grouping

    • @shakilalam1
      @shakilalam1 3 года назад

      You should start using PHP Storm it suggests that by default.

  • @gustavoaeidt
    @gustavoaeidt 3 года назад

    I left a comment on #54 about something on your challenge that I tried to do but couldn’t. Was there something we could have done regarding those update routes using post methods?
    Another thing that I was kinda unsure and was a topic mentioned here was about setting the namespace of the routes folder to the controller folder and don’t deal with use statements at all.
    My decision for committing to that was that the project only had a single folder for controllers and since routes usually leads to controllers it felt like a goodbye approach at the time. I’m not sure if that violates PSR or it could cause trouble and confusion in the future.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      No, those methods are not supposed to be in resource, cause their behavior is different from default Resource Controllers. With setting the namespace - not sure, I haven't seen anyone doing it, I guess it's the case of "if it doesn't break anything, it's probably ok" :)

    • @gustavoaeidt
      @gustavoaeidt 3 года назад +1

      @@LaravelDaily awesome! Well, I cannot remember another time that I was stuck for that long on a single Laravel documentation page. It was a very clever challenge despite its simplicity.
      Well done and I hope everything gets well soon regarding to your daughter.

  • @Roccatstr
    @Roccatstr 3 года назад

    Can you make a simple livewire/alpine wizard form tutorial? Im new to livewire and i dont know the best use cases. Thank you for making your videos, you are awesome!

    • @LaravelDaily
      @LaravelDaily  3 года назад

      From what I remember, I have something on my livewirekit com

  • @ab_azmi5584
    @ab_azmi5584 2 года назад

    Nice.

  • @shaungbhone8368
    @shaungbhone8368 3 года назад

    What about mine? 😊

  • @belce1982
    @belce1982 3 года назад

    Currently, 2021-10-06, the video it's not in the 'Laravel challenges' - Playlists.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Thanks, fixed.

    • @belce1982
      @belce1982 3 года назад +1

      @@LaravelDaily No problem, you are undoubtedly the MVP here. Thanks!

  • @alnahian2003
    @alnahian2003 2 года назад

    Loved the 'use' grouping on namespaces. Gotta utilize that thing soon and will pretend to be a pro laravel dev 😎😁 (kidding)

  • @iukhan2015
    @iukhan2015 3 года назад

    Great Videos, Thanks for the precious resources.
    Request: Do a code review of Workice CRM or any other advanced Project which do not use laravel traditional filesystem. I have tried navigating through the project but its all new to me whereas I have been a laravel developer for 2 years now. I already have license purchased if you need that.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      I don't like and don't prefer Laravel projects that don't use Laravel traditional file system, so not going to review them.

  • @krishnanarasimha1243
    @krishnanarasimha1243 3 года назад

    Super guru

  • @raziuldev
    @raziuldev 3 года назад

    I was expecting my PR (#33) to be seen :(
    I saw many PR missed to separate books.show from 'auth' middleware.
    Although I did enjoyed the challenge.

    • @raziuldev
      @raziuldev 3 года назад

      Also prefer 'name' over 'as' for naming routes.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Sorry, I was unable to discuss majority of PRs, I spent 5 days last week in a hospital with my daughter, with very small online time at all.
      Now I've looked at your #33, and you did a lot of things right, but didn't do the very first thing I expected - extract long controller path names on top into "use" statements.

    • @raziuldev
      @raziuldev 3 года назад

      Yeah, I did saw your tweets about the incident :(
      I pray everything gets well soon