get the first value of a callection in laravel code example
Example: collection get first element laravel
$first = $msgs->first(); // this does ->take(1) under the hood
$first = $msgs->first(); // this does ->take(1) under the hood