vendredi 20 septembre 2019

Laravel User Model multiple extends required

I have a fresh Laravel install, with default web authentication and email verifications installed (which uses the default packages and install with artisan). This makes my User model extend Authentication and MustVerifyEmail, like so:

class User extends Authenticatable implements MustVerifyEmail {...}

Since this is a model, I would like to implement relationships with other models like a Post can have many comments. I cannot make use of the Model class because I can't extend two classes. So what the solution/alternative to this problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire