39 lines
855 B
PHP
39 lines
855 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\License;
|
|
use App\Models\Tenant;
|
|
use App\Models\User;
|
|
use App\Policies\LicensePolicy;
|
|
use App\Policies\TenantPolicy;
|
|
use App\Policies\UserPolicy;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
if (app()->environment() !== 'testing') {
|
|
URL::forceScheme('https');
|
|
}
|
|
|
|
Gate::policy(User::class, UserPolicy::class);
|
|
Gate::policy(License::class, LicensePolicy::class);
|
|
Gate::policy(Tenant::class, TenantPolicy::class);
|
|
}
|
|
}
|