public function boot()
 {
     $this->publishes([__DIR__ . '/../../../database/migrations/' => database_path('/migrations')], 'migrations');
     $this->publishes([__DIR__ . '/../../../config/' => config_path()], 'config');
     SiteConfig::macro('has_bonus', function () {
         return config('bonus') != null;
     });
     \Blade::extend(function ($view, $compiler) {
         $pattern = "/(?<!\\w)(\\s*)@blink\\(\\s*(.*?)\\)/";
         return preg_replace($pattern, '$1' . '<?php if($auth->admin || $auth->id == $2->user->id || $auth->id == $2->user->referral_id|| $auth->id == $2->user->new_referral_id) {?>' . PHP_EOL . '<a href="/bonus-management/view/<?php echo $2->id ?>">' . PHP_EOL . '#<?php echo (1024 + $2->id) ?>' . PHP_EOL . '</a>' . PHP_EOL . '<?php } else { ?>' . PHP_EOL . '<?php echo (1024 + $2->id) ?>' . PHP_EOL . '<?php }?>', $view);
     });
 }
 public function boot()
 {
     $this->app['router']->middleware('role', \Klsandbox\RoleModel\Http\Middleware\RoleMiddleware::class);
     $this->publishes([__DIR__ . '/../../../database/migrations/' => database_path('/migrations')], 'migrations');
     $this->publishes([__DIR__ . '/../../../config/' => config_path()], 'config');
     SiteConfig::macro('has_staff', function () {
         return (bool) config('role.roles.staff');
     });
     SiteConfig::macro('has_dropship', function () {
         return (bool) config('role.roles.dropship');
     });
     SiteConfig::macro('dropship_can_register', function () {
         return (bool) config('role.can_register.dropship');
     });
     SiteConfig::macro('has_sales', function () {
         return (bool) config('role.roles.sales');
     });
 }
 public function boot()
 {
     $this->publishes([__DIR__ . '/../../../database/migrations/' => database_path('/migrations')], 'migrations');
     $this->publishes([__DIR__ . '/../../../config/' => config_path()], 'config');
     \Blade::extend(function ($view, $compiler) {
         $pattern = "/(?<!\\w)(\\s*)@olink\\(\\s*(.*?)\\)/";
         return preg_replace($pattern, '$1' . '<?php if($auth->admin || $auth->staff || $auth->id == $2->user_id || ($2->user && $auth->id == $2->user->referral_id)  || ($2->user && $auth->id == $2->user->new_referral_id) || $auth->premium) {?>' . PHP_EOL . '<a href="/order-management/view/<?php echo $2->id ?>">' . PHP_EOL . '#<?php echo (1024 + $2->id) ?>' . PHP_EOL . '</a>' . PHP_EOL . '<?php } else { ?>' . PHP_EOL . '<?php echo (1024 + $2->id) ?>' . PHP_EOL . '<?php }?>', $view);
     });
     SiteConfig::macro('show_products', function () {
         return config('order.show_products');
     });
     SiteConfig::macro('allow_multiple_products', function () {
         return config('order.allow_multiple_products');
     });
     SiteConfig::macro('allow_quantity', function () {
         return config('order.allow_quantity');
     });
     SiteConfig::macro('allow_other_product', function () {
         return config('order.allow_other_product');
     });
 }