Hi, Given this simple database setup: posts - id tags - id post_tag - id - post_id - tag_id ......
In my Message.php model, I defined the following: class Message extends Eloquent { public functi...
zenry said: $tags = ['a', 'b']; $posts = Post::whereHas('tags', function($query) use($tags) { $quer...
Works with Message::find(1)->userfrom()->first()->username;, thanks. I figured why it didn'...
The Laravel portal for problem solving, knowledge sharing and community building.
The community