lundi 31 octobre 2016

Fetching data from multiple tables in laravel5

I have two tables posts and sharedposts. sharedposts table has columns "user_id", "updated_at" and "post_id" where as posts table has 'id', 'title' and 'body'. I know about the relations to link both tables. All i want to do is to display each post ordered by 'updated_at' from both the tables. Please help with both query builder and eloquent way. Thanku



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire