mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
39 lines
929 B
PHP
39 lines
929 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Events\Login;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Event;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use PragmaRX\Google2FALaravel\Listeners\LoginViaRemember;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Paginator::useTailwind();
|
|
|
|
// Share global data with all views using View Composer
|
|
view()->composer('*', \App\View\Composers\GlobalDataComposer::class);
|
|
|
|
Gate::define('viewPulse', function (User $user) {
|
|
return $user->hasRole('Admin');
|
|
});
|
|
Event::listen(Login::class, LoginViaRemember::class);
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
}
|