Cordial greetings colleagues, it turns out that I'm doing the following query using query builder in laravel:
public function getSocial_network_post(Post $post)
{
$query = DB::table('post_social_networks')->select('social_network_id')->where('post_id','=',$post->id)->get();
return $query;
}
From which I receive the following result:
I need to get the whole value of that query and save it in an array so it looks like this:
['1','2']
Any ideas on how I could do this?