how to check exist element in laravel collection code example Example: laravel check if collection has value Auth::user()->ports->contains('port', $request->port);