'int', 'favoritable_id' => 'int' ]; protected $fillable = [ 'user_id', 'favoritable_id', 'favoritable_type' ]; public function user() { return $this->belongsTo(User::class); } public function favoritable() { return $this->morphTo(); } }