1

I want to make class User extend both Authenticatable and Model at the same time:

class User extends Authenticatable

class User extends Model

What is the proper way to do it?

3
  • 4
    Multiple inheritance doesn't exist in PHP. Commented Jul 7, 2017 at 8:58
  • Extend Authenticatable from Model and User from Authenticatable if it's ok ! Commented Jul 7, 2017 at 8:58
  • 1
    the class User already extends from Model laravel.com/api/5.4/Illuminate/Foundation/Auth/User.html Commented Jul 7, 2017 at 9:13

1 Answer 1

4

The User class by default extends Illuminate\Foundation\Auth\User as Authenticable. This class already extends the Model class.

Check the API for more information

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.