You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
532 B

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Upload extends Model
{
public $incrementing = false;
protected $table = 'upload';
protected $guarded = [];
protected $primaryKey = 'id';
public function setHeadersAttribute(?array $headers)
{
$this->attributes['headers'] = $headers ? serialize($headers) : null;
}
public function getHeadersAttribute(): ?array
{
return $this->attributes['headers'] ? unserialize($this->attributes['headers']) : null;
}
}