Panduan Laravel Eloquent Relationships
- Deskripsi
- Materi
- Ulasan
Kursus ini dirancang untuk membantu Anda memahami konsep dan praktik terbaik dalam membangun relasi antara model menggunakan Laravel Eloquent. Relasi database sangat penting dalam pengembangan aplikasi, terutama ketika bekerja dengan data yang kompleks dan terstruktur. Di kursus ini, Anda akan mempelajari bagaimana menggunakan berbagai jenis relasi yang disediakan Laravel Eloquent untuk menghubungkan data antar tabel dengan cara yang efisien dan mudah dikelola. Anda akan belajar melalui langkah-langkah praktis serta studi kasus yang mencakup berbagai tipe relasi seperti one-to-one, one-to-many, many-to-many, serta relasi polymorphic.
Apa yang akan anda pelajari?
-
One-to-One Relationship
- Implementasi
hasOne()danbelongsTo()untuk menghubungkan data satu-satu antara tabel.
- Implementasi
-
One-to-Many Relationship
- Memahami penggunaan
hasMany()untuk membuat hubungan antara satu data dengan banyak data terkait.
- Memahami penggunaan
-
Many-to-Many Relationship
- Menggunakan
belongsToMany()untuk relasi banyak ke banyak. - Cara menambah dan mengambil data dari tabel pivot dalam relasi many-to-many.
- Mengelola event
attach,detach, dansyncpada relasi many-to-many.
- Menggunakan
-
Has-One-Through & Has-Many-Through
- Menghubungkan data secara tidak langsung dengan relasi
has-one-throughdanhas-many-through. - Penggunaan pivot model pada relasi
has-many-through.
- Menghubungkan data secara tidak langsung dengan relasi
-
Polymorphic Relationships
- Menggunakan relasi polymorphic one-to-many dan one-to-one untuk membuat model yang fleksibel.
- Implementasi
many-to-manypolymorphic untuk menghubungkan berbagai jenis data dengan satu entitas.
-
11. One to One relationship | hasOne() & belongsTo()Pratinjau 16:31
-
22. One To Many relationship | hasMany()Pratinjau 13:57
-
33. Many To Many relationship | belongsToMany()14:28Sorry, this lesson is currently locked. You need to complete "2. One To Many relationship | hasMany()" before accessing it.
-
44. Adding & Retrieving Pivot Table Columns in Many To Many Laravel Eloquent Relationships8:02Sorry, this lesson is currently locked. You need to complete "3. Many To Many relationship | belongsToMany()" before accessing it.
-
55. Handle events on attach, detach or sync in Many To Many Laravel Eloquent Relationships7:34Sorry, this lesson is currently locked. You need to complete "4. Adding & Retrieving Pivot Table Columns in Many To Many Laravel Eloquent Relationships" before accessing it.
-
66. has-one-through & has-many-through Laravel Eloquent Relationships15:34Sorry, this lesson is currently locked. You need to complete "5. Handle events on attach, detach or sync in Many To Many Laravel Eloquent Relationships" before accessing it.
-
77. has-many-through relation using Pivot model12:20Sorry, this lesson is currently locked. You need to complete "6. has-one-through & has-many-through Laravel Eloquent Relationships" before accessing it.
-
88. One to Many & One to One Polymorphic Relationships15:09Sorry, this lesson is currently locked. You need to complete "7. has-many-through relation using Pivot model" before accessing it.
-
99. Many to Many Polymorphic Relationship13:25Sorry, this lesson is currently locked. You need to complete "8. One to Many & One to One Polymorphic Relationships" before accessing it.
1. One to One relationship | hasOne() & belongsTo()
Jam Kerja
| Monday | 07.00 WIB - 16.00 WIB |
| Tuesday | 08.00 WIB - 15.00 WIB |
| Wednesday | 06.00 WIB - 15.00 WIB |
| Thursday | 07.00 WIB - 16.00 WIB |
| Friday | 08.00 WIB - 15.00 WIB |
| Saturday | Closed |
| Sunday | Closed |