1

I'm having trouble using Ardent package with Laravel authentication.

The problem is that in order to use Laravel authentication I have to extend my User model with Authenticatable (use Illuminate\Foundation\Auth\User as Authenticatable;)

But in order to use Ardent, I need to extend my User model with Ardent.

PHP doesn't support multiple inheritance (thank god), so now I am out of ideas on how to solve this?

Norgul
  • 4,613
  • 13
  • 61
  • 144

1 Answers1

2

Authenticatable is an interface. So, you can create User extending Arden and implementing Authenticatable.

You can only extend one class but implement multiple interfaces:

class User extends Arden implements Authenticatable { ... }
jeprubio
  • 17,312
  • 5
  • 45
  • 56