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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -