vendredi 24 mai 2019

How to set two different names for name_type by Relation::morphMap() for only one model according to the conditions?

    Relation::morphMap([
        'media' => 'App\Models\IMedia'
    ]);

In IMedia we have videos and photos. I want according to the conditions instead of App\Models\IMedia to be written video or photo, not media. What is the solution?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire