You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I'm trying to implement a package that depends on laravel-aaa.
But, I faced a problem, My User model's status is different than the dnj\AAA\Contracts\UserStatus that defined as contract.
As you know, we can not extend an Enum: Why enums aren't extendable
But, luckily Enums can implement Interface
So I suggest to define an Interface that named dnj\AAA\Contracts\IUserStatus and use this Interface as our input-output type and the UserStatus implements this Interface, see:
Hello
I'm trying to implement a package that depends on
laravel-aaa
.But, I faced a problem, My User model's status is different than the
dnj\AAA\Contracts\UserStatus
that defined as contract.As you know, we can not extend an Enum: Why enums aren't extendable
But, luckily
Enum
s can implementInterface
So I suggest to define an Interface that named
dnj\AAA\Contracts\IUserStatus
and use this Interface as our input-output type and theUserStatus
implements this Interface, see:The text was updated successfully, but these errors were encountered: