Skip to content
Advertisement

Tag: laravel-6

Laravel Query Builder joining with alias

I have two tables Unknown table Clients table My Code : Joining will be with the clients.id => unknown.parent_id… As because the clients table has a parent_id that’s why i have to use the alias Please Help me to do so! Answer Using Alias Working Solution:

Laravel Dynamic DB Relation

I didn’t find any solution so i am asking it here.. The id of Team is related with teams in Match ,for this the solution is easy.. but The Problem is that one Match can have 3/4+ no of teams So i have to make it dynamic … Answer As Per @maki10 The working Solution Is

Laravel 6 many to many relationship

In laravel 6, I have 2 models I have third model to join tables Now how can I get all the teachers those are not subscribed by a particular student? For example: Teacher1, Teacher2, Teacher3, Teacher4 are in the Teacher table and Student1, Student2, Student3, Student4 are in the Student table Student1 subscribed Teacher1, Teacher2 Student2 subscribed Teacher1, Teacher4 Student3

Advertisement