*/ protected $fillable = [ 'uid', 'category', 'title', 'link', 'image', 'width', 'height', 'status', 'created_id', 'created_at', 'updated_at', 'deleted_at' ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ ]; protected $visible = [ 'uid', 'category', 'title', 'link', 'image', 'width', 'height', 'status', 'created_at' ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'category' => 'integer', 'width' => 'integer', 'height' => 'integer', 'status' => 'integer' ]; public function user() { return $this->belongsTo('App\Models\User', 'created_id'); } }