mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-poc.git
synced 2026-08-19 04:13:55 +00:00
41 lines
790 B
PHP
41 lines
790 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class VaporUiServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->gate();
|
|
}
|
|
|
|
/**
|
|
* Register the Vapor UI gate.
|
|
*
|
|
* This gate determines who can access Vapor UI in non-local environments.
|
|
*/
|
|
protected function gate(): void
|
|
{
|
|
Gate::define('viewVaporUI', function (User $user = null) {
|
|
return in_array(optional($user)->email, [
|
|
//
|
|
]);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
}
|