Is there a generic way to check if a Laravel Model has relationships? -
i trying write generic function fire if model has relationships defined not specific model.
is there property of model tell me if model has relationships regardless of model or relationships?
you have access relations using:
$model->getrelations();
Comments
Post a Comment