for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Console\Commands\Debug;
use App\User;
use Illuminate\Console\Command;
class GiveAdminRole extends Command
{
protected $signature = 'debug:give-admin-role {email}';
protected $description = 'Give admin role to the user (email) given';
public function __construct()
parent::__construct();
}
public function handle()
$email = $this->argument('email');
$user = User::where('email', $email)->first();
$user->assignRole(['admin']);