collection get first element laravel

PHP
$first = $msgs->first(); // this does ->take(1) under the hood

Source

Also in PHP: