Files
new_raffles/app/Console/Commands/GeneratePermissions.php
2025-07-27 17:40:56 +05:45

35 lines
774 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Modules\User\Repositories\PermissionRepository;
use Modules\User\Services\PermissionService;
class GeneratePermissions extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'permissions:generate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generate Permissions using Named Route';
/**
* Execute the console command.
*/
public function handle()
{
$this->info('Generating Permissions');
PermissionService::generatePermissionFromRoutes();
$this->info('Permissions have been generated!');
}
}