Код: Выделить всё
$notifications = DB::table('notifications')
->select(DB::raw("notifications.uuid ,notifications.brand_id" ))
$posts = DB::table('posts')
->select(DB::raw("posts.uuid ,posts.brand_id" ))
->unionAll ($notifications)
->orderBy('created_at' , 'desc')
->where('brand_ids' , '=' , '2')
$result = $posts->get();
Код: Выделить всё
->where('brand_id' , '=' , '2')
Подробнее здесь: https://stackoverflow.com/questions/374 ... ion-result
Мобильная версия