for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PavelMironchik\LaravelBackupPanel;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
class LaravelBackupPanelApplicationServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
$this->configureAuthorization();
}
* Configure the Laravel Backup Panel authorization services.
protected function configureAuthorization()
$this->gate();
LaravelBackupPanel::auth(function ($request) {
return App::environment('local') ||
Gate::check('viewLaravelBackupPanel', [$request->user()]);
});
* Register the Laravel Backup Panel gate.
* This gate determines who can access Laravel Backup Panel in non-local environments.
protected function gate()
Gate::define('viewLaravelBackupPanel', function ($user) {
return in_array($user->email, [
// '[email protected]'
]);
* Register any application services.
public function register()
//