You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get it to work. This is what I did for a created_at field in users table /** * Get the filters available for the resource. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function filters(NovaRequest $request) { return [ DateRange::make('Created At', ['from', 'till']), ]; }
I can't get it to work. This is what I did for a created_at field in users table
/** * Get the filters available for the resource. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function filters(NovaRequest $request) { return [ DateRange::make('Created At', ['from', 'till']), ]; }
Doesn't seem to work. I get an error
[2023-03-10 20:53:54] local.ERROR: Undefined array key "" {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined array key "" at /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/FilterDecoder.php:48)
[stacktrace]
#0 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/FilterDecoder.php(48): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Undefined array...', '/Users/ghassanb...', 48)
#1 [internal function]: Laravel\Nova\FilterDecoder->Laravel\Nova\{closure}(Array, 0)
#2 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(695): array_map(Object(Closure), Array, Array)
#3 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/FilterDecoder.php(57): Illuminate\Support\Collection->map(Object(Closure))
#4 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/Http/Requests/DecodesFilters.php(19): Laravel\Nova\FilterDecoder->filters()
#5 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/Http/Requests/ResourceIndexRequest.php(20): Laravel\Nova\Http\Requests\ResourceIndexRequest->filters()
#6 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/Http/Resources/IndexViewResource.php(19): Laravel\Nova\Http\Requests\ResourceIndexRequest->searchIndex()
#7 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/Http/Resources/Resource.php(41): Laravel\Nova\Http\Resources\IndexViewResource->toArray(Object(Laravel\Nova\Http\Requests\ResourceIndexRequest))
#8 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/nova/src/Http/Controllers/ResourceIndexController.php(19): Laravel\Nova\Http\Resources\Resource->toResponse(Object(Laravel\Nova\Http\Requests\ResourceIndexRequest))
#9 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Laravel\Nova\Http\Controllers\ResourceIndexController->__invoke(Object(Laravel\Nova\Http\Requests\ResourceIndexRequest), 'policies')
#10 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('__invoke', Array)
#11 /Users/ghassanbarghouti/Documents/yasmina/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Laravel\Nova\Http\Controllers\ResourceIndexController), '__invoke')
The text was updated successfully, but these errors were encountered: