New Laravel Challenge: Routes Cleanup

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 41

  • @thiefsoul1924
    @thiefsoul1924 3 ปีที่แล้ว +7

    Oh god, it took me about 2-3 hours to set up the environment. It's the first time I'll take a part in the challenge and my environment was not prepared (including GIT setup, any kind of MySQL server, etc). I have green tests and I already feel like a winner even without starting a "Routes Cleanup" :D It seems that I can learn even more than just routes refactoring :D

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      I'm glad you will learn something more, that's the point of my challenges - the PRACTICAL learning :)

  • @ahmedhelal174
    @ahmedhelal174 3 ปีที่แล้ว +4

    Thank you
    Can we make the challenges under one list so we can get old ones easily?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Great suggestion, done: th-cam.com/video/HrVu7y3bOeQ/w-d-xo.html

  • @belce1982
    @belce1982 3 ปีที่แล้ว

    Thank you very much as always. Don't stop now, keep going!
    Greetings from Málaga, Spain.

  • @CharlesM123
    @CharlesM123 3 ปีที่แล้ว +1

    You're awesome. Thanks for all the effort.

  • @JustinByrne1337
    @JustinByrne1337 3 ปีที่แล้ว +1

    Thanks for the extra time on this challenge, looking forward to sinking my teeth into it

  • @GergelyCsermely
    @GergelyCsermely 3 ปีที่แล้ว +1

    Thanks, it will be interesting :)

  • @gustavoaeidt
    @gustavoaeidt 3 ปีที่แล้ว

    When I decided to take part in this challenge I thought it would be quick and easy but that’s not the case at all.
    One thing that I never had to deal with while working with routes is having to dump autoload on every single change. I have no idea what sorcery you did there but I will find out

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Not sure about any sourcery, no one else complained over 50+ pull requests.

    • @gustavoaeidt
      @gustavoaeidt 3 ปีที่แล้ว

      @@LaravelDaily don’t get me wrong, I’m not complaining. It’s just an odd behavior related to namespaces that I never had to deal with. I will let you know what it was when I figure it out

    • @gustavoaeidt
      @gustavoaeidt 3 ปีที่แล้ว +1

      @@LaravelDaily I have figured out what was wrong here. It was related to route cache and testing.
      I have disabled cache for testing and the changes made to web.php started reflecting properly on the test files.
      That was a valuable lesson

  • @miqoo1996
    @miqoo1996 3 ปีที่แล้ว

    Author, I have a question for you if you don't mind, I had a project where it was required to upload files up to 50MB, I put validation for file size and it worked, but when I uploaded a file of about 1 GB it didn't work due to the restriction of server and I got an error, how do you think, how can I pup up a validation message on this specific case? If I used custom PHP then it was easy to take an advantage of try-catch, but I'm unable to do it here, in Laravel. Is this a bug/gab in Laravel?

  • @jamshidbekyuldoshev7542
    @jamshidbekyuldoshev7542 3 ปีที่แล้ว

    @Laravel Daily it would be better if you share your experience to us how to make and to use CI and CD for laravel. Thanks

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      I've done something similar here: th-cam.com/video/P-cuiTVXlck/w-d-xo.html
      But generally, there are a lot of tools for CI and CD, I can't really cover everything. Maybe in the future.

    • @jamshidbekyuldoshev7542
      @jamshidbekyuldoshev7542 3 ปีที่แล้ว

      Thank you very much

  • @vijayrockers3546
    @vijayrockers3546 3 ปีที่แล้ว

    hii bro, I watched your most videos.
    all good to learn.
    i build one laravel project. it's running smooth in local server.
    but in the live server, it's working well. but suddenly its get 403 forbidden.
    after I clear the site catch its working well.
    Tried in google but did not get.
    can u help me?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      Sorry it's impossible to debug this remotely "by magic" in a TH-cam comment :) The problem needs debugging, something's wrong with your permissions, or web-server settings.

  • @mohamadcheaib
    @mohamadcheaib 3 ปีที่แล้ว

    Is their any way to use gates on route resources? Or we should use gates inside controllers

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      In real life, in route resource different methods will be assigned to different gates, so not much sense to assign gate to full resource.
      But if you do want to assign one gate to full resource, then please use Route::group and middleware, and inside of that group put the resource.

    • @mohamadcheaib
      @mohamadcheaib 3 ปีที่แล้ว

      @@LaravelDaily yes thats what i means, how to seperate gates if we are using resource route, should i use the gate's logic inside the controllers or there is another way?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Yes, inside the controllers.

    • @mohamadcheaib
      @mohamadcheaib 3 ปีที่แล้ว

      @@LaravelDaily thanks 👍

  • @Hello-mu1et
    @Hello-mu1et 3 ปีที่แล้ว

    Can we use controller@method in routes?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Yes but then change the setting in RouteServiceProvider for this.

    • @Hello-mu1et
      @Hello-mu1et 3 ปีที่แล้ว

      @@LaravelDaily Okey

  • @princeparaste5659
    @princeparaste5659 3 ปีที่แล้ว +1

    OMG ! Who write routes like this😆

    • @miqoo1996
      @miqoo1996 3 ปีที่แล้ว

      Someone who thinks he is also a Laravel developer))))

  • @krishnanarasimha1243
    @krishnanarasimha1243 3 ปีที่แล้ว

    Can you share git link for every videos

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      I do share links to git if I prepare them. For some small demo examples I don't prepare git projects.

    • @krishnanarasimha1243
      @krishnanarasimha1243 3 ปีที่แล้ว

      @@LaravelDaily good reply. But mostly not understanding with short you know that project where folders and files are but we are not understanding sorry to say this you are targeting very high level but not understanding the students like me seeing the small videos. Please dont mind this

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +2

      I don't think I'm targeting very high level, I'm targeting people who I call "advanced juniors", but who understand the structure of general Laravel code and where folders/files should be.
      If I target total beginners, then my videos would be much longer, I don't want to do that.
      And it takes extra time to prepare some code to be well-presented on Github, to put it as repository, sorry I don't have enough time in the day.

    • @krishnanarasimha1243
      @krishnanarasimha1243 3 ปีที่แล้ว

      @@LaravelDaily good, but thanks

    • @krishnanarasimha1243
      @krishnanarasimha1243 3 ปีที่แล้ว

      But yes, some i am able to understand your videos. But sometimes no. Thats okay thanks guru

  • @abdulbasitsalah2918
    @abdulbasitsalah2918 3 ปีที่แล้ว

    all the test fail in my side
    where i first test it

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      What is the failure error?

    • @RitvarsZ
      @RitvarsZ 3 ปีที่แล้ว +1

      @@LaravelDaily When running the test, AddPriceToBooksTable and AddBooksDescription migrations were failing for me because we add NOT NULL fields with no default values (SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "books" add column "price" integer not null))

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Maybe it depends on SQL settings, it worked for me for some reason. You can probably change the migrations to make the tests work, as part of your Pull Request. Thanks!

    • @stasj1743
      @stasj1743 3 ปีที่แล้ว +1

      @@LaravelDaily @Ritvars Zvejnieks it happens cuz of sqlite, he wants a default value for not nullable columns

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +2

      I've merged the Pull Request with the fix for this.