New Laravel Challenge: Routes Cleanup

  Рет қаралды 6,892

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 41
@thiefsoul1924
@thiefsoul1924 3 жыл бұрын
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 жыл бұрын
I'm glad you will learn something more, that's the point of my challenges - the PRACTICAL learning :)
@belce1982
@belce1982 3 жыл бұрын
Thank you very much as always. Don't stop now, keep going! Greetings from Málaga, Spain.
@ahmedhelal174
@ahmedhelal174 3 жыл бұрын
Thank you Can we make the challenges under one list so we can get old ones easily?
@LaravelDaily
@LaravelDaily 3 жыл бұрын
Great suggestion, done: kzbin.info/www/bejne/fqO5pmqvaMeCm7M
@CharlesM123
@CharlesM123 3 жыл бұрын
You're awesome. Thanks for all the effort.
@JustinByrne1337
@JustinByrne1337 3 жыл бұрын
Thanks for the extra time on this challenge, looking forward to sinking my teeth into it
@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 жыл бұрын
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 жыл бұрын
@@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
@mohamadcheaib
@mohamadcheaib 3 жыл бұрын
Is their any way to use gates on route resources? Or we should use gates inside controllers
@LaravelDaily
@LaravelDaily 3 жыл бұрын
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 жыл бұрын
Yes, inside the controllers.
@mohamadcheaib
@mohamadcheaib 3 жыл бұрын
@@LaravelDaily thanks 👍
@Hello-mu1et
@Hello-mu1et 3 жыл бұрын
Can we use controller@method in routes?
@LaravelDaily
@LaravelDaily 3 жыл бұрын
Yes but then change the setting in RouteServiceProvider for this.
@Hello-mu1et
@Hello-mu1et 3 жыл бұрын
@@LaravelDaily Okey
@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?
@GergelyCsermely
@GergelyCsermely 3 жыл бұрын
Thanks, it will be interesting :)
@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 KZbin comment :) The problem needs debugging, something's wrong with your permissions, or web-server settings.
@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: kzbin.info/www/bejne/hl7GppyKi72fmc0 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
@krishnanarasimha1243
@krishnanarasimha1243 3 жыл бұрын
Can you share git link for every videos
@LaravelDaily
@LaravelDaily 3 жыл бұрын
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 жыл бұрын
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
@princeparaste5659
@princeparaste5659 3 жыл бұрын
OMG ! Who write routes like this😆
@miqoo1996
@miqoo1996 3 жыл бұрын
Someone who thinks he is also a Laravel developer))))
@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 жыл бұрын
@@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 жыл бұрын
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 жыл бұрын
@@LaravelDaily @Ritvars Zvejnieks it happens cuz of sqlite, he wants a default value for not nullable columns
@LaravelDaily
@LaravelDaily 3 жыл бұрын
I've merged the Pull Request with the fix for this.
Laravel Routes: Grouping and Other "Tricks" - Challenge Result
7:41
Laravel Junior Code Review: 12 Tips on Everything
15:30
Laravel Daily
Рет қаралды 76 М.
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
Laravel Security: Top 7 Mistakes Developers Make
11:16
Laravel Daily
Рет қаралды 87 М.
Eloquent Performance: TOP 3 Mistakes Developers Make
7:59
Laravel Daily
Рет қаралды 49 М.
Faster Eloquent: Avoid Accessors with Foreach
9:35
Laravel Daily
Рет қаралды 54 М.
Laravel: Avoid Try-Catch In Every Method (What To Do Instead)
4:45
Laravel Daily
Рет қаралды 35 М.
Eloquent Performance Challenge: My Solution Version
9:57
Laravel Daily
Рет қаралды 19 М.
הנאום המלא שלי בעימות באוקספורד! Yoseph Haddad's speech at Oxford
19:05
יוסף חדאד - Yoseph Haddad
Рет қаралды 323 М.
The Surprising Story of PHP
12:20
CodeSource
Рет қаралды 36 М.
What’s Up with Laravel? It’s Everywhere, and Here’s Why!
6:22
LAVROV's interview with Tucker CARLSON 😁 [Parody]
8:34
Юрий ВЕЛИКИЙ
Рет қаралды 365 М.
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН