roleRepo = $roleRepository; } /** * Execute the console command. * * @return mixed */ public function handle() { $this->info('Scanning for modules permissions...'); // Reset cached roles and permissions app()['cache']->forget('spatie.permission.cache'); $result = $this->roleRepo->synchModulePermissions(true); $this->info('Permissions Created: '.count($result['created'])); $this->info('Permissions Deleted: '.count($result['deleted'])); } }