adrema/app/Providers/AppServiceProvider.php

40 lines
814 B
PHP
Raw Normal View History

2020-04-10 20:32:12 +02:00
<?php
namespace App\Providers;
use Illuminate\Http\RedirectResponse;
2020-04-10 20:32:12 +02:00
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\ServiceProvider;
2022-02-12 00:41:52 +01:00
use Laravel\Telescope\Telescope;
2020-04-10 20:32:12 +02:00
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
JsonResource::withoutWrapping();
2022-02-12 00:41:52 +01:00
Telescope::ignoreMigrations();
2020-06-02 23:45:25 +02:00
\Inertia::share('search', request()->query('search', ''));
2022-03-11 20:19:17 +01:00
RedirectResponse::macro('success', function ($flash) {
session()->flash('flash', ['success' => $flash]);
return $this;
});
2020-04-10 20:32:12 +02:00
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
}
}