Laravel custom artisan command act as authenticated user

Viewed 342

I have created my custom artisan command that do a certain job and this job ask for the user permission (user should be authenticated as ADMIN to do this job)

    public function handle()
    {
        $invoice_type = $this->argument('invoice_type');
        // ACTION HERE THAT NEED USER AUTHENTICATION
        $this->info('done..');
    }

Question is:

Is there a way so I could make this command act as certain user?

Command signature: protected $signature = 'invoices:net_total {invoice_type}';

0 Answers
Related