new forms added for courses

This commit is contained in:
HolgerHatGarKeineNode
2023-02-27 18:37:23 +01:00
parent d1d0d5ce3d
commit ce972e66c6
28 changed files with 612 additions and 49 deletions

View File

@@ -23,31 +23,25 @@ class Lecturer extends Model implements HasMedia
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'team_id' => 'integer',
'active' => 'boolean',
'id' => 'integer',
'active' => 'boolean',
];
protected static function booted()
{
static::creating(function ($model) {
if (! $model->created_by) {
if (!$model->created_by) {
$model->created_by = auth()->id();
}
if (! $model->team_id) {
$model->team_id = auth()->user()->current_team_id;
}
});
}