2020-04-10 20:32:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2024-01-13 21:53:39 +01:00
|
|
|
use App\Form\Models\Form;
|
2023-06-01 15:02:35 +02:00
|
|
|
use App\Mailgateway\Types\LocalType;
|
2023-06-01 16:50:50 +02:00
|
|
|
use App\Mailgateway\Types\MailmanType;
|
2021-10-30 00:49:36 +02:00
|
|
|
use Illuminate\Http\RedirectResponse;
|
2020-04-10 20:32:12 +02:00
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
2024-04-20 00:04:20 +02:00
|
|
|
use Illuminate\Support\Facades\Blade;
|
2021-10-30 00:49:36 +02:00
|
|
|
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();
|
2020-06-02 23:45:25 +02:00
|
|
|
|
|
|
|
\Inertia::share('search', request()->query('search', ''));
|
2021-10-30 00:49:36 +02:00
|
|
|
|
2022-03-11 20:19:17 +01:00
|
|
|
RedirectResponse::macro('success', function ($flash) {
|
2021-10-30 00:49:36 +02:00
|
|
|
session()->flash('flash', ['success' => $flash]);
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
});
|
2023-06-01 15:02:35 +02:00
|
|
|
|
|
|
|
app()->bind('mail-gateways', fn () => collect([
|
|
|
|
LocalType::class,
|
2023-06-01 16:50:50 +02:00
|
|
|
MailmanType::class,
|
2023-06-01 15:02:35 +02:00
|
|
|
]));
|
2024-01-13 21:53:39 +01:00
|
|
|
|
|
|
|
app()->extend('media-library-helpers', fn ($p) => $p->put('form', Form::class));
|
2024-04-20 00:04:20 +02:00
|
|
|
|
|
|
|
Blade::componentNamespace('App\\View\\Mail', 'mail-view');
|
2020-04-10 20:32:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|