30 Days to Learn Laravel, Ep 07 - Autoloading, Namespaces, and Models

  Рет қаралды 15,359

Laracasts

Laracasts

Күн бұрын

Пікірлер: 23
@2rock4u8
@2rock4u8 2 ай бұрын
Chapter Ep 07 - Autoloading, Namespaces, and Models We can also use: public static function find(int $id): ?array { return Arr::first(static::all(), fn($job) => $job['id'] === $id) ?? abort(404, 'Job not found'); } } To get error message! Excellent course!!! 👍🙏
@keithpickard7036
@keithpickard7036 9 ай бұрын
This series arrived at the perfect time. Thanks for the releases thus far.
@jonathanperera5263
@jonathanperera5263 5 ай бұрын
The explanation on Models was all-encompassing! While I already had a little idea of what models were, this explanation laid a solid-concrete foundation in my mind. This tutor is Top-Tier! Thank You from Sri Lanka! By the way, I'm a huge ZZ Top fan as well!
@sale7680
@sale7680 4 ай бұрын
I think u r really clarify the concept of working laravel and how the folder distinguished , how code may be better So thank u 🙏
@PayamJianTV
@PayamJianTV 5 ай бұрын
Thanks to this amazing series, I learn a lot. At 12:45 of the video, the code "return $job" is missing.
@mahmoudfouda7562
@mahmoudfouda7562 3 ай бұрын
Thank U
@mhballa5866
@mhballa5866 19 күн бұрын
Thank you, I was bewildered when it did not work. but how come it worked for him without adding the return statement.
@unisonrul1171
@unisonrul1171 9 ай бұрын
This is amazing
@sale7680
@sale7680 4 ай бұрын
Amazing❤❤❤
@funkyjammaclips
@funkyjammaclips Ай бұрын
changing return to $job = breaks the code and wont display any jobs instead i get the error. "App\Models\Job::find(): Return value must be of type array, none returned" when trying to display the existing jobs. When checking a job id that doesnt exist i do get the 404 page. edit: further in the video I can see you fixed this error with "return $job;" but nowhere was this ever mentioned I just happen to notice it at the end.
@edorourke9223
@edorourke9223 7 ай бұрын
At around 12:40, you edit the "first" method, but you do not initially include a return. And you don't mention it. Later in the vid, it's there, but initially, I left it out and got an error. I guess, at worst, it's probably a good lesson in troubleshooting. Just pointing it out in case you didn't see it.
@yogiarismet1025
@yogiarismet1025 6 ай бұрын
Damn, I overlooked it too. I've been stuck for a while there trying to find the error. After checking this comment of yours, I finally able to move forward. Thanks for pointing that out.
@linuxforarabs2881
@linuxforarabs2881 6 ай бұрын
Thank you for pointing that. It is shown on 13:35. However, I'm did not figure out why Job class was created in model not in a controller :(
@renatofrota
@renatofrota 6 ай бұрын
@@linuxforarabs2881 MVC architecture. Model is related to the data and the "business rules". Further in the course it will likely be converted to a more complete class that specifies the format of data stored in the database for a "Job" entity instead of having an array of jobs in the class itself.
@hiiamyaqub8301
@hiiamyaqub8301 27 күн бұрын
Hi sir can you make Laravel advance project series any project you make
@mohamedaminedammak2319
@mohamedaminedammak2319 8 ай бұрын
at 10:13 we're passing $id to find that accept an int but $id is a string is it automatically converted or what?
@abdomahmoud8769
@abdomahmoud8769 7 ай бұрын
The id that comes from the url is a string and we said we need an int but there is no error. I think if we enabled the strict mode it will throw an error
@mohamedaminedammak2319
@mohamedaminedammak2319 7 ай бұрын
@@abdomahmoud8769 thank you 🤝
@renatofrota
@renatofrota 6 ай бұрын
@@abdomahmoud8769 if you are going to use strict types you will need to convert the string that came from URL to an int (e.g.: casting) when passing it as parameter to the find() function.
@udayworldwide
@udayworldwide 3 ай бұрын
PHP is loosely typed language. Getting anything from url is a string no matter whether enclosed in quotes or not.
@programmer6284
@programmer6284 6 ай бұрын
hello anyone experience with anchor tag VALUE changing into job/jobs but the href is jobs when access route to job/{id}
@khanra17
@khanra17 8 ай бұрын
Tooo much over eddited audio. Please keep distance from the mic. The audio is so much annoying and fake(boosted lower frequencies), why don't you sound like in real life?
@LyiarDev
@LyiarDev Ай бұрын
😂😂😂😂
30 Days to Learn Laravel, Ep 08 - Introduction to Migrations
17:02
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 213 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Laravel Crash Course
2:28:57
Traversy Media
Рет қаралды 637 М.
DTO в laravel для requests а также обзор библиотеки от Spatie
7:40
Просто о сложном. CutCode
Рет қаралды 10 М.
30 Days to Learn Laravel, Ep 09 - Meet Eloquent
18:17
Laracasts
Рет қаралды 14 М.
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 40 М.
API vs SDK: What’s the Difference?
3:42
Klippa
Рет қаралды 17 М.
30 Days to Learn Laravel, Ep 06 - View Data and Route Wildcards
20:03
Laravel Service Providers: All You Need to Know
13:13
Laravel Daily
Рет қаралды 69 М.