Search Results For: relationship
Showing 1 to 1 of 1 blog articles.
1838 views · 94 days ago

![Laravel Eloquent Relationship Part 1](

Laravel introduces eloquent relationships from laravel 5.0 onwards. We all know, while we creating an application we all have foreign keys. Each table will be connected to some other. Eloquent make easy to connect each tables easily. Here we will One to one, one to many and many to many relationships. Here we will see three types of relationships,

1. One to one relationships

2. One to many relationships

3. Many to many relationships

## Why Eloquent Relationships

Here we have 2 tables, students and marks, so for join each table,


$student = student::join(‘marks’,’marks.student_id,’=’,’)->where(‘’,’1’)->get();



the above query is to l...


    Faster PHP Cloud Hosting