Page MenuHomePhorge

UserSuspend.php
No OneTemporary

Authored By
Unknown
Size
885 B
Referenced Files
None
Subscribers
None

UserSuspend.php

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

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:20 PM (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18742584
Default Alt Text
UserSuspend.php (885 B)

Event Timeline