Answers for "laravel raw query join many to many"

PHP
0

laravel raw query join many to many

$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();
Posted by: Guest on June-18-2020

Code answers related to "laravel raw query join many to many"

Browse Popular Code Answers by Language