Page MenuHomePhorge

UserDelete.php
No OneTemporary

Size
823 B
Referenced Files
None
Subscribers
None

UserDelete.php

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class UserDelete extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:delete {user}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Delete a user';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = \App\User::where('email', $this->argument('user'))->first();
if (!$user) {
return 1;
}
$user->delete();
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Oct 19, 9:56 PM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1548452
Default Alt Text
UserDelete.php (823 B)

Event Timeline