FnChain
FnChain is an experimental helper I came up with when dealing with the following nesting closure:
return $query
->where('is_enabled', true)
->where('available_from', '<=', DB::raw('NOW()'))
->where(
fn (Builder $q) => $q
...
blog.binota.org1 min read