SyntaxFix
Write A Post
Hire A Developer
Questions
Starting from Laravel 5.3 you can simply use :
if ($mentor->isNotEmpty()) { //do something. }
Documentation https://laravel.com/docs/5.5/collections#method-isnotempty