Route::has('login'), 'canRegister' => Route::has('register'), 'laravelVersion' => Application::VERSION, 'phpVersion' => PHP_VERSION, ]); }); //Route::get('/person', [PersonController::class, 'index'])->middleware('auth:sanctum',config('jetstream.auth_session'), 'verified'); Route::middleware([ 'auth:sanctum', config('jetstream.auth_session'), 'verified', ])->group(function () { Route::get('/dashboard', function () { $person = new Person(); $chart = new ExampleChart(new LarapexChart()); $clients = $person::with(['group','type']) ->whereHas('group', fn($que) => $que->where('deleted','=',0)) ->whereHas('type', fn($que) => $que->where('deleted','=',0)) ->where([ ['person.active','=',1], ['person.group_id','=',1] ]) ->limit(10) ->orderBy('id', 'desc') ->get(); return Inertia::render( 'Dashboard', [ 'chart' => $chart->build(), 'clients' => $clients ] ); })->name('dashboard'); //client Route::get('client', [ClientController::class, 'index'])->name('client'); Route::get('client/{uuid}', [ClientController::class, 'show'])->name('client.show'); Route::post('client', [ClientController::class, 'store'])->name('client.store'); //contract Route::Post('contract', [ContractController::class, 'store'])->name('contract.store'); });