Generally laravel is smart enough to detect many-to-many relationships if you set up your tables properly Both table names should be not pluralized in the intermediate/pivot table so you should have Users, Blogs, Posts, Tags as your individual tables and User_Blog, Blog_Post, Post_Tag as your intermediate tables. In those tables the cols should properly reflect the tablename_id (in lowercase) so in User_Blog it should have 3 cols id, user_id, blog_id etc and so on for the other columns.
In your models you just need to set up the many-to-many relationships
class User extends Eloquent
{
public function blogs()
{
return $this->has_many_and_belongs_to('Blog');
}
}
And so on for each model. If changing the structure isn't an option then simply add the table name in the many-to-many relationship like so return $this->has_many_and_belongs_to('Blog', 'User_blogs');