Eloquent One To One Relationship | Laravel For Beginners | Learn Laravel

  Рет қаралды 11,771

Code With Dary

Code With Dary

Күн бұрын

This video will dive into Eloquent’s One to One Relationship 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/course/masterin...
📲 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/codewithdary
💌 Newsletter
Sign up for my free weekly email newsletter: www.newsletter.codewithdary.com
🔥 Resources
- PHP Hosting (10% DISCOUNT): www.hostinger.com/codewithdary
- TikTok: / codewithdary
- Instagram: / codewithdary
- Twitter: / codewithdary
- Blog: blog.codewithdary.com/
- Newsletter: newsletter.codewithdary.com/
- Patreon: www.patreon.com/user?u=30307830
- GitHub: github.com/codewithdary
Want to learn more?
- Courses: / @codewithdary
📋 Table of Content
00:00 - Introduction
00:47 - Creating Our Migration & Model
03:02 - Insert data
04:06 - hasOne()
08:25 - belongsTo()
#laravel #laravel8 #php #onetoone #eloquent

Пікірлер: 26
@codewithdary
@codewithdary 2 жыл бұрын
LETS CONNECT THROUGH INSTAGRAM. www.Instagram.com/codewithdary
@elkhanhamet2561
@elkhanhamet2561 3 жыл бұрын
thank you Dary, such a great course!!!
@codewithdary
@codewithdary 3 жыл бұрын
You're so welcome!
@iftekharemon8418
@iftekharemon8418 2 жыл бұрын
This helps me a lot. Thanks.
@codewithdary
@codewithdary 2 жыл бұрын
You're welcome!
@Azamkhan-tw3fc
@Azamkhan-tw3fc 2 жыл бұрын
Thank you Dary I learned a lot from you :D
@codewithdary
@codewithdary 2 жыл бұрын
Appreciate it Azam!
@shye351
@shye351 2 жыл бұрын
how can you insert data in parent model with child model in using eloquent?
@fahvygaming1118
@fahvygaming1118 2 жыл бұрын
For the last section of the video when you were trying to access the Car from the headquarters. You passed in find($id) and I feel that id should be changed to $car_id or something. I don't know if you understand what I mean
@mibrahim4245
@mibrahim4245 Жыл бұрын
The id of the headquarter so what he did is correct
@tallitvak5325
@tallitvak5325 3 жыл бұрын
Legend.
@codewithdary
@codewithdary 3 жыл бұрын
You are!
@carlfranz6805
@carlfranz6805 2 жыл бұрын
One of the things you may wish to consider teaching is what to do if a migration goes wrong. I mistyped something and the migration created the table but error-ed out creating the index relationship between tables. What do you need to do to fix that. Is there something other then dropping the table in 'mysql' or 'phpmyadmin'? One of the things Laravel appears to be not good at is, if something happens mid process, returning you to a known state.
@codewithdary
@codewithdary 2 жыл бұрын
Hi Carl. I definitely try to implement that in most of my videos but I can't do that for every single one!
@Dipj01
@Dipj01 2 ай бұрын
Laravel does help you with that. You can do php artisan migrate:refresh that rollbacks changes (drops the tables) and then reapplies the migrations automatically. You can also do php artisan migrate:refresh --seed to not only rollback and reapply the migrations from fresh, but also then seed the freshly created tables. I know it's 2 years late, but hopefully this will help newcomers.
@khawlakhiari7534
@khawlakhiari7534 3 жыл бұрын
i have an error probabli is in the route of the get methode
@codewithdary
@codewithdary 3 жыл бұрын
Show me the code :)
@rajabhishek2936
@rajabhishek2936 3 жыл бұрын
Nice
@codewithdary
@codewithdary 3 жыл бұрын
So nice
@OnlyJavascript
@OnlyJavascript 3 жыл бұрын
i am planning to make an e-wallet app after completing this course. I will share it soon. All credits goes to my guru ji "DARY".
@codewithdary
@codewithdary 3 жыл бұрын
All the best! :D
@OnlyJavascript
@OnlyJavascript 3 жыл бұрын
@@codewithdary thanks guru ji
@hafeezmughal806
@hafeezmughal806 3 жыл бұрын
User model is to be deleted, how create again user model. "Php artisan make:model user" it's not create default user model
@codewithdary
@codewithdary 3 жыл бұрын
Github is the right place for you :) github.com/laravel/laravel/blob/8.x/app/Models/User.php
@khawlakhiari7534
@khawlakhiari7534 3 жыл бұрын
and i don't find your route
@mibrahim4245
@mibrahim4245 Жыл бұрын
do you still need help ?
Introduction To Eloquent | Laravel For Beginners | Learn Laravel
45:20
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 76 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 15 МЛН
Laravel Eloquent Relationships: [1] One to One
17:33
Designated Coder
Рет қаралды 761
How To Model a One-To-One Relationship in a Database (And Why)
8:33
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 137 М.