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
{{ message }}
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
I'm initialising because I use a seeder to create the models.
I have migrated the settings and company is another model connected to user model by foreign ID.
User model:
namespaceApp\Models;
useLaravel\Sanctum\HasApiTokens;
useIlluminate\Notifications\Notifiable;
useDarkGhostHunter\Laraconfig\HasConfig;
useIlluminate\Contracts\Auth\MustVerifyEmail;
useIlluminate\Database\Eloquent\Factories\HasFactory;
useIlluminate\Foundation\Auth\UserasAuthenticatable;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable, HasConfig;
/** * The attributes that are mass assignable. * * @var array<int, string> */protected$fillable = [
'name',
'email',
'password',
'company_id'
];
/** * The attributes that should be hidden for serialization. * * @var array<int, string> */protected$hidden = [
'password',
'remember_token',
];
/** * The attributes that should be cast. * * @var array<string, string> */protected$casts = [
'email_verified_at' => 'datetime',
];
publicfunctioncompany()
{
return$this->belongsTo(Company::class);
}
}
Company model:
namespaceApp\Models;
useDarkGhostHunter\Laraconfig\HasConfig;
useIlluminate\Database\Eloquent\Factories\HasFactory;
useIlluminate\Database\Eloquent\Model;
class Company extends Model
{
use HasFactory, HasConfig;
protected$fillable = [
'name',
];
}
Am I missing something?
Note: I was able to create user settings but when I added company that's when the error started.
Versions:
"laravel/framework": "^8.75",
"darkghosthunter/laraconfig": "^1.3.5",
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When initialising the settings I get this error:
Column not found: 1054 Unknown column 'theme' in 'field list' (SQL: insert into
user_settings
(settable_id
,settable_type
,metadata_id
,theme
,updated_at
,created_at
) values (1, App\Models\Company, 1, dark, 2022-02-15 10:01:07, 2022-02-15 10:01:07))users.php:
Initialization:
I'm initialising because I use a seeder to create the models.
I have migrated the settings and company is another model connected to user model by foreign ID.
User model:
Company model:
Am I missing something?
Note: I was able to create user settings but when I added company that's when the error started.
Versions:
The text was updated successfully, but these errors were encountered: