fix style
This commit is contained in:
parent
be700ab81b
commit
27fc5ee6e8
@ -41,11 +41,13 @@ class DemoteUser extends Command
|
|||||||
$user = User::where('name', $this->argument('username'))->first();
|
$user = User::where('name', $this->argument('username'))->first();
|
||||||
if ($user === null) {
|
if ($user === null) {
|
||||||
$this->error('No user with such username');
|
$this->error('No user with such username');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user->is_admin) {
|
if (!$user->is_admin) {
|
||||||
$this->info('@' . $user->name . ' is already an user.');
|
$this->info('@' . $user->name . ' is already an user.');
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,11 +41,13 @@ class PromoteUser extends Command
|
|||||||
$user = User::where('name', $this->argument('username'))->first();
|
$user = User::where('name', $this->argument('username'))->first();
|
||||||
if ($user === null) {
|
if ($user === null) {
|
||||||
$this->error('No user with such username');
|
$this->error('No user with such username');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->is_admin) {
|
if ($user->is_admin) {
|
||||||
$this->info('@' . $user->name . ' is already an administrator.');
|
$this->info('@' . $user->name . ' is already an administrator.');
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class DashboardController extends Controller
|
class DashboardController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
use App\Information;
|
use App\Information;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class AddIsAdminToUsers extends Migration
|
class AddIsAdminToUsers extends Migration
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user