Controllers In Laravel | Learn Laravel From Scratch | Laravel For Beginners
HTML-код
- Опубликовано: 21 окт 2024
- This video will show you how you could create and use Controllers in Laravel - Learn one of the most popular PHP frameworks for its advanced features, templating engine, fast commands and security.
📚 New Udemy Course
If you're looking to level up your Laravel skills, my new course "Udemy Migirations, Seeders, Factories, Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: www.udemy.com/...
📲 Let’s plan a meeting
Plan a (paid) 1-hour meeting on Calendly to do portfolio reviews, code reviews resume reviews or a coaching session for Laravel. Please read the description before booking: calendly.com/c...
💌 Newsletter
Sign up for my free weekly email newsletter: www.newsletter...
🔥 Resources
PHP Hosting (10% DISCOUNT): www.hostinger....
TikTok: / codewithdary
Instagram: / codewithdary
Twitter: / codewithdary
Blog: blog.codewithd...
Newsletter: newsletter.cod...
Patreon: www.patreon.co...
GitHub: github.com/cod...
Want to learn more?
Courses: / @codewithdary
#laravel #laravel8 #php #controllers
LETS CONNECT THROUGH INSTAGRAM.
instagram.com/codewithdary
Having gone through PHP, OOP, MVC and now Laravel, I am soooo pleased to find your channel - it is excellent and very much needed!
There's so much content about Laravel but most of it is years' old and totally out of date in methods, syntax and structure.
Thanks for the excellent tutorials so far - please keep up the good work!
He is really awesome man.
Can't thank you enough David! Keep me updated if a certain Laravel topic of missing :)
My man! :)
I'm so lucky that I finally found a tutorial that makes it easier to understand Laravel 8. Thank you so much sir Dary! Kudos! :)
Love the positivity Adrian, thank you!
Couldn’t be explained better👏
Thank you so much
Thanks for the videos. I really like how you show multiple ways of accomplishing the task.
Thanks Man. I’ll do it because whenever you google issues, you might see a solution in a different way and I don’t want the viewers to think that there’s only one way to accomplish something
Great explanation, even though i don't have any fundamentals in php nor laravel, very easy to catch up! Thank you so much!!!
Wow that is incredible to hear :)
All right guys! Love your intro. Learning a lot from your videos. 🙏
me too
Awesome! Thank you!
The best videos for Laravel that I've seen. Really good to find your channel!
The best channel so far i have seen.
Keep up the good work.
Whoa that’s awesome to hear Andre! Thank you.
Dude you are a life saver.
Thank you man!
Nice tutorial. Only thing is: I'm pretty sure you don't have Emmet but Laravel Blade Snippets. I didn't watch the videos before so I was confused as Emmet didn't work.
I've got both because VS code has Emmet installed b default :)
DUDE WHAT THE HELL ? ur SO genuis and I'm happy to watch ur video !. U make my DAY
Wow, thanks!
I enjoy these videos. I have one suggestion for you why don't you use the --resourse parameter to create all of A CRUD requirement. Laravel resource routing assigns the typical create, read, update, and delete ("CRUD") routes to a controller with a single line of code away from the headache of missing of or forgetting a statement
It's a video series, I did focused on the resource controllers later on :)
Thank you for your great tutorial, very helpful.
You are welcome!
Thank you for the tutorials, very helpful
You're very welcome!
You can return multiple with properties:
return view('products.index)
->with('title', $title)
->with('description', $description);
Definitely! Would probably prefer returning an array over multiple with methods!
vanakkam guru ji 🙏.. my only mentor for Laravel.
Awesome! :D :D
Hi Dary, thanks for your course! Tip/qq: when hitting a laravel error-message page you might use that event to show how to interpret error-messages. That is a useful part of coding as well.
Thanks for sharing!
Hi Dary, How do we use namespace in the Laravel 8 routing? For example I want to make my api with versioning. Do I have a better way to write instead of "use App\Http\Controllers\V1\ProductController", "use App\Http\Controllers\V2\ProductController"...
No :( you got to pull it in the use statement.
you are a blessing
No, you are a blessing for watching and commenting so I can start my day the right way! Thanks :)
finally found someone whom i can understand
Nice, happy to help :)
@@codewithdary yees im actually making projects but not on my own, i always follow youtube videos so i figured out that i have to really understand the basic logics in order to build a system, and luckily i found your youtube channel! thank you so much, i love how you explain it, straightforward with easy vocabularies. that's why it can be understood, i like this better than at my school hahaha, thank you!
liked your video ~ from Pakistan
Thank you Sebastian! Love from the Netherlands.
The old method before Laravel 8 routing is working with Laravel version 8.6 :D
Don’t pay too much attention to the version numbers. They add a new version number is a new patch comes out, which can be very small. Laravel 7 to 9 on the other hand is a big difference.
hi dary! your explanation in awesome. but I go this error ErrorException
Undefined variable: data (View: D:\Laravel\leckho
esources\views\addons\index.blade.php) $data is undefined
Make the variable optional in the blade template. Replace {{ $data }} with {{ $data ?? '' }} how to rectify the issue please let u me know
Are you passing $data correctly from the controller to the view It's not recognising $data in your index.blade.php file! :)
I really like your channel, keep going! But I advice you to use to terminal of vscode I'ts a lot less effort.
Thanks for the tip! I was kind of in-between. Didn't knew which one was easier to use. Maybe for MySQL, it's better to use the terminal. But anyways, lots of thanks for your comment.
Thank you
Thanks for watching :)
Is there a playlist?
Yessir! ruclips.net/p/PLFHz2csJcgk_3VJwzVoeyMuC1rdBcfiLv
Actually we can also pass multiple variables using ->with to blade file like Ex: ->with('name',$name)->with('age',$age);
Definitely true!
awesome
Thank you! ❤️
12:30 404 NOT FOUND error is displaying. What should I do ?
Difficult to help without code.
total how many videos?
totally 9 videos so far.
@@OnlyJavascript i meant total, not current :)
@@ahmedsunil3235 it depends
I have no idea, I'll try to cover everything, I'm checking after every section how many videos I want to add.
What does (Request $request) do and why?
public function store(Request $request) {
2 $this->validate($request, [
3 'name' => 'required|string',
4 'body' => 'required|string',
5 'publish_at' => 'required|date_format:Y-m-d H:i:s'
6 ]);
It holds the request that has been submitted from a form :)
Hello
I had problem but I solved it. When I want to route to the index.blade.php file and then Laravent didn't find this.
"InvalidArgumentException
View [index.blade] not found.
domingo.bingo/products".
I modified view('index.blade') to view('index') in file ProductsController.php
stackoverflow.com/questions/17913929/laravel-view-not-found-exception
For people who will or have had the same problem as me.
I would be happy if someone could explain why this is happening
The view method finds the file based on the name without the file extension. In your case, it will convert it to index.blade.blade.php.