samedi 26 décembre 2015

Method paginate does not exist

When I do:

    $tournaments =  Tournament::paginate(Config::get('constants.PAGINATION'));

it works, but I just need tournaments that owns the user.

So I do:

    $tournaments = Auth::user()->tournaments;
    $tournaments->paginate(Config::get('constants.PAGINATION'));

I have a hasMany Relationship in user model

And I get this message

Method paginate does not exist.

How can I solve it? It doesn't seem complicated, but I can't do it!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire