$updatedPages=DB::table('links')->join('users','users.id','=','links.user_id')->select('users.littlelink_name','users.image',DB::raw('max(links.created_at) as created_at'))->groupBy('links.user_id')->orderBy('created_at','desc')->take(4)->get();
$updatedPages=DB::table('links')->join('users','users.id','=','links.user_id')->select('users.littlelink_name','users.image',DB::raw('max(links.created_at) as created_at'))->groupBy('links.user_id')->orderBy('created_at','desc')->take(4)->get();