Different query results with Laravel Octane

I am trying to query results, but with Octane I get different results. Within an attach action I am trying to do the following query:
Forms\Components\Select::make('recordId')
->label('Product')
->live()
->options(
fn () => Product::query()
->whereNotIn('id', $this->ownerRecord->products()->pluck('id'))
->orWhereNull('project_id')
->orWhere('project_id', $this->ownerRecord->project_id)
->pluck('name', 'id')
)
->afterStateUpdated(function ($state, Forms\Set $set) {
$set('price', Product::findOrFail($state)?->default_price); // @phpstan-ignore-line
$set('token_price', Product::findOrFail($state)?->default_price / $this->ownerRecord->project->token_price); // @phpstan-ignore-line
})
->searchable()
->preload()
->required(),
Forms\Components\Select::make('recordId')
->label('Product')
->live()
->options(
fn () => Product::query()
->whereNotIn('id', $this->ownerRecord->products()->pluck('id'))
->orWhereNull('project_id')
->orWhere('project_id', $this->ownerRecord->project_id)
->pluck('name', 'id')
)
->afterStateUpdated(function ($state, Forms\Set $set) {
$set('price', Product::findOrFail($state)?->default_price); // @phpstan-ignore-line
$set('token_price', Product::findOrFail($state)?->default_price / $this->ownerRecord->project->token_price); // @phpstan-ignore-line
})
->searchable()
->preload()
->required(),
When using Octane I get all results, but when not using octane the query is right. How can this be possible and what could I do about this? I am talking about the options query.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server