opnform/app/Providers/ModelStatsServiceProvider.php

25 lines
609 B
PHP
Raw Permalink Normal View History

2022-09-20 19:59:52 +00:00
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Jhumanj\LaravelModelStats\LaravelModelStats;
use Jhumanj\LaravelModelStats\ModelStatsServiceProvider as Provider;
class ModelStatsServiceProvider extends Provider
{
/**
* Register the LaravelModelStats gate.
*
* This gate determines who can access ModelStats in non-local environments.
*/
protected function gate(): void
{
Gate::define('viewModelStats', function ($user) {
return in_array($user->email, [
'julien@notionforms.io',
]);
});
}
}