Connection set on morphed model

Any idea how do i setup my relations so that eloquent respects my $connection set on model ? in my Order.php i have
public function orderable()
{
return $this->morphTo();
}
public function orderable()
{
return $this->morphTo();
}
in my Company model i have
protected $table = 'companies';

protected $connection = 'crm';

public function orders()
{
return $this->morphMany(Order::class, 'orderable');
}
protected $table = 'companies';

protected $connection = 'crm';

public function orders()
{
return $this->morphMany(Order::class, 'orderable');
}
but seems when i do a search in filament it searches on my default db connection any idea?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?