<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Http\Resources\Json\JsonResource; class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { JsonResource::withoutWrapping(); \Inertia::share('search', request()->query('search', '')); } /** * Bootstrap any application services. * * @return void */ public function boot() { // } }