Laravel 8 tutorial in Hindi - Joins
HTML-код
- Опубликовано: 10 сен 2024
- In this laravel 8 video tutorial, we learn what is join and how to use join in laravel tutorial a simple way. This video is made by anil Sidhu in the Hindi language.
steps of video
What is Join
Make Controller
Import DB Files
Join with where the condition
Interview Question on laravel DB
Laravel 9 tutorial in hindi
Laravel tutorial in Hindi
Laravel 9 playlist in Hindi
• Laravel 9 tutorial in ...
Please support me by subscribe, like and comment :) thank you
LEFT JOIN: This join returns all the rows of the table on the left side of the join and matching rows for the table on the right side of join. The rows for which there is no matching row on right side, the result-set will contain null.
Ex: $users = DB::table('users')
->leftJoin('posts', 'users.id', '=', 'posts.user_id')
->get();
RIGHT JOIN: RIGHT JOIN is similar to LEFT JOIN. This join returns all the rows of the table on the right side of the join and matching rows for the table on the left side of join. The rows for which there is no matching row on left side, the result-set will contain null.
Ex: $users = DB::table('users')
->rightJoin('posts', 'users.id', '=', 'posts.user_id')
->get();
Again thanks buddy
thanks bhai
good answer
thanks bro
🤩
owesome tutorail thank you so much sir
thankuh sir
same procedure we can follow for left join or right join but instead of join method we will using leftJoin and rightJoin method.
nice!
can you make a video on how to handle multiple textinput field in react native....if it is available please provide a link....
sure, just give me some time , i will make a video on this
@@codestepbystep there will be an error if we join table created manually and table created by migration as their "Collation" will be different. i got this error and solved it by changing "Collation" .
can we join multiple tables through join
Join or foreignkey me difference hai kya kon jada acha hai
left joins
$results = DB::table('left_table')
->leftJoin('right_table', 'left_table.id', '=', 'right_table.left_table_id')
->select('left_table.*', 'right_table.column as joined_column')
->get();
right joins:
$results = DB::table('left_table')
->rightJoin('right_table', 'left_table.id', '=', 'right_table.left_table_id')
->select('left_table.column as joined_column', 'right_table.*')
->get();
how to insert data into another table using joins?