how to know if model belongstomany or belongsto code example Example: laravel check if model relation exists $model->relation()->exists()