“laravel raw query join many to many” Coderfunda Code Answer
laravel raw query join many to many
0
Programing Coderfunda January 25, 2022 Laravel, php No comments
$query = DB::table('blog_posts')
->join('model_names_relations', 'blog_posts.id', '=', 'model_names_relations.blog_post_id')
->join('model_names', 'model_names.id', '=', 'model_names_relations.model_name_id')
->where('blog_posts.id', '12')
->get();
0 comments:
Post a Comment
Thanks