skip to Main Content

Laravel – Accessing path params of FormRequest

I have this code: class BunnyUpdateRequest extends FormRequest { public function authorize(): bool { return true; } public function rules(): array { return [ 'id' => ['required', 'min:1'], 'status' => ['required', Rule::enum(BunnyStatus::class)] ]; } public function validationData(){ return array_merge($this->all(), […

VIEW QUESTION

Laravel – Splitting up query with join, using load in strict mode

I wrote a code something like this: $bunnies = Bunny::with(['carrots' => function ($query) use ($request){ if (empty($request->carrotStatus)) return; $query->where('status', $request->carrotStatus); }, 'owner']) ->select('bunnies.*') ->join('carrots', 'bunnies.id', '=', 'carrots.bunny_id') ->where(function (Builder $query) use ($request){ if (empty($request->carrotStatus)) return; $query->where('carrots.status', $request->carrotStatus); }) ->where(function (Builder…

VIEW QUESTION

Laravel – FilamentPHP – Table actions not firing

I have a table function in a custom Filament page: I have initialized the page like this: <?php namespace AppFilamentAppResourcesOIPRequestResourcePages; use AppFilamentAppResourcesOIPRequestResource; use FilamentResourcesPagesPage; use FilamentTablesContractsHasTable; use FilamentFormsContractsHasForms; use FilamentTablesTable; use IlluminateDatabaseEloquentBuilder; use AppModelsOIPRequest; use FilamentTablesFiltersSelectFilter; use FilamentTablesFiltersFilter; use FilamentResourcesPagesListRecordsTab;…

VIEW QUESTION
Back To Top
Search