How to Use Relationships in Nova | Nova One to Many Relationship | Laravel Nova for Beginners
This video will show you how you could use relationships in Laravel Nova. You can define the same relationships you have within Laravel itself. In this tutorial about relationships in Nova, we’re specifically going to look at the One to Many relationship. We will be using the Product and Brand models, where one product will be associated with one Brand, while one Brand, have multiple Products.
📚 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: https://www.udemy.com/course/mastering-laravel-10-query-builder-eloquent-relationships/?referralCode=C784C3DB5B8925207FCB
📲 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: https://calendly.com/codewithdary
💌 Newsletter
Sign up for my free weekly email newsletter: https://www.newsletter.codewithdary.com
🔥 Resources
- PHP Hosting (10% DISCOUNT): https://www.hostinger.com/codewithdary
- TikTok: https://www.tiktok.com/@codewithdary
- Instagram: https://www.instagram.com/codewithdary/
- Twitter: https://twitter.com/codewithdary
- Blog: https://blog.codewithdary.com/
- Newsletter: https://newsletter.codewithdary.com/
- Patreon: https://www.patreon.com/user?u=30307830
- GitHub: https://github.com/codewithdary/product-dashboard
📋 Table of Content
00:00 - Introduction
00:36 - Brand Model & Migration
02:02 - Adding brand_id column to Products
04:01 - Brand Resource
07:32 - Product BelongsTo Brand
08:09 - Brand HasMany Products
08:37 - Adding Field Types to Our Resources