vendredi 6 janvier 2017

laravel 5.1: get relation in with

I have a model called user with relation "travel" model and travel model with relation "destination"

how can I get user in eloquent with travel and relation.

I know that I can get travel like this :

    $row = $this->model
        ->find($reqId)
        ->with('travel')
        ->first();

I want get destination of travels .



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire