akaunting/app/Models/Common/Widget.php
2019-12-31 02:20:10 +03:00

35 lines
639 B
PHP

<?php
namespace App\Models\Common;
use App\Abstracts\Model;
use Bkwld\Cloner\Cloneable;
class Widget extends Model
{
use Cloneable;
protected $table = 'widgets';
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
protected $fillable = ['company_id', 'dashboard_id', 'class', 'name', 'settings', 'sort'];
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'settings' => 'object',
];
public function dashboard()
{
return $this->belongsTo('App\Models\Common\Dashboard');
}
}