Hi,
I'm trying to create a structure for different types of users but can't seem to get it to work, i get this error:
Cannot construct newFromBuilder for unrecognized type=agency
class User extends Authenticatable
{
use SingleTableInheritanceTrait;
protected $table = 'users';
protected static $singleTableTypeField = 'type';
protected static $singleTableTypeClasses = [
Agency::class
];
}
class Agency extends User
{
protected static $singleTableType = 'agency';
}
User i'm trying to get with User::find($user_id) has the "type" attribute set to "agency".
I'm using Laravel 5.4
Hi, I'm trying to create a structure for different types of users but can't seem to get it to work, i get this error: Cannot construct newFromBuilder for unrecognized type=agency
User i'm trying to get with User::find($user_id) has the "type" attribute set to "agency". I'm using Laravel 5.4
Am I missing something?