vendredi 9 mars 2018

Check if laravel model instance exists on DB in constructor

Is there a way to check if a Laravel model is retrieved from DB or created with new command in its constructor?

I've tried with $this->exists but in the __construct it always returns false...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tyDxlU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire