created_by corrected

This commit is contained in:
Benjamin Takats
2022-12-15 21:51:15 +01:00
parent ce0c12ac9e
commit cf31b4d5ea
16 changed files with 136 additions and 17 deletions

View File

@@ -16,23 +16,28 @@ class BitcoinEvent 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',
'id' => 'integer',
'venue_id' => 'integer',
'from' => 'datetime',
'to' => 'datetime',
'from' => 'datetime',
'to' => 'datetime',
];
protected static function booted()
{
static::creating(function ($model) {
$model->created_by = auth()->id();
});
}
public function registerMediaConversions(Media $media = null): void
{
$this