migrate to gtea from bistbucket
This commit is contained in:
34
app/Providers/AppServiceProvider.php
Normal file
34
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
|
||||
Blade::if('usercan', function ($permission) {
|
||||
return auth()->check() && auth()->user()->hasPermission($permission);
|
||||
});
|
||||
|
||||
Blade::if('usercanany', function ($permissions) {
|
||||
return auth()->check() && auth()->user()->hasAnyPermission($permissions);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user