I am trying to concatinate 2 tables for the blog using laravel, however i can't seem to get it working and i have no clue as to why..
if i use selectRaw i can see the concat but i lose all the blog content and i only see the author and nothing else.
I have tried to switch to raw and if i do the concat doesn't work but everything else works.
Here is the php code i am using:
$app->get('/', function() use ($app) {
$blog = $app->blog->selectRaw('CONCAT(users.first_name, " ", users.last_name) as author')->join('users', 'blog.user_id', '=', 'users.id')->get();
$app->render('home.php', [
'blog' => $blog
]);
})->name('home');