One to Many Relationship in Laravel | Full Laravel 9 Course | Laravel For Beginners | Learn Laravel

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

Code With Dary

Code With Dary

Күн бұрын

This video will show you how you could easily create the one to many relationship in Laravel. The example we're going to use in this video is with the Post and User class - Want to learn the most popular PHP framework? Laravel makes your development process a lot easier without sacrificing your applications functionalities.
📚 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/larav...
🔗 Useful links
- Laravel 8 Course: • Complete Laravel Tutor...
- Laravel Breeze: • Laravel Breeze Tutoria...
📋 Table of Content
00:00 - Introduction
01:17 - Installing Laravel Breeze
03:10 - Updating our routes
03:50 - Adding a foreign key constraint to the posts table
08:05 - Defining our user to post relationship
11:03 - Defining our post to user relationship
#laravel #framework #php #laravel9

Пікірлер: 8
@alnahian2003
@alnahian2003 Жыл бұрын
Hey Dary! I really enjoy watching your videos 🙌
@codewithdary
@codewithdary Жыл бұрын
Thank you so much!! :)
@roteshere
@roteshere Жыл бұрын
Thank you Dary! Keep it up.
@codewithdary
@codewithdary Жыл бұрын
Thank you for watching Ruben!
@vickyha4945
@vickyha4945 Жыл бұрын
its help me a lot :)
@codewithdary
@codewithdary Жыл бұрын
Love to hear that Vicky.
@tomaswachtel7060
@tomaswachtel7060 Жыл бұрын
Hello, could anyone please help me? I struggle with the Defining our user to post relationship part. When I use foreach in dashboard.blade.php, the error ''Undefined variable $posts'' occurs.
@codewithdary
@codewithdary Жыл бұрын
You need to make sure that you send back posts from the controller to the view.
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,9 МЛН
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 24 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 96 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Laravel Eloquent One To Many Relationship | Laravel Tutorial
13:46
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 137 М.
What is GitOps, How GitOps works and Why it's so useful
11:33
TechWorld with Nana
Рет қаралды 337 М.
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,9 МЛН