6 months ago

Chain-break Eloquent methods

Posted 6 months ago by Mikegk

Hi guys,

I just wanted to create an Eloquent Query and some parts of it should just be applied to the filters if certain parameters are set

$model = MyModel::with('tasks','projects')


Sadly that doesn't work. I also can neither use MyModel->where(...) nor MyModel::where(...) to continue...

Any ideas?

Please sign in or create an account to participate in this conversation.