check if laravel hasOne is null code example Example: laravel check if model relation exists $model->relation()->exists()