clear unused imported namespaces
This commit is contained in:
parent
13e51464f6
commit
2461b47d75
|
|
@ -2,18 +2,14 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use View;
|
|
||||||
use Utils;
|
|
||||||
use Option;
|
use Option;
|
||||||
use Datatables;
|
use Datatables;
|
||||||
use App\Events;
|
use App\Events;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\Player;
|
use App\Models\Player;
|
||||||
use App\Models\Texture;
|
use App\Models\Texture;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Services\OptionForm;
|
use App\Services\OptionForm;
|
||||||
use App\Exceptions\PrettyPageException;
|
|
||||||
use App\Services\Repositories\UserRepository;
|
use App\Services\Repositories\UserRepository;
|
||||||
|
|
||||||
class AdminController extends Controller
|
class AdminController extends Controller
|
||||||
|
|
@ -38,10 +34,9 @@ class AdminController extends Controller
|
||||||
|
|
||||||
$homepage = Option::form('homepage', OptionForm::AUTO_DETECT, function($form)
|
$homepage = Option::form('homepage', OptionForm::AUTO_DETECT, function($form)
|
||||||
{
|
{
|
||||||
$form->text('home_pic_url')->hint(OptionForm::AUTO_DETECT);
|
$form->text('home_pic_url')->hint();
|
||||||
|
|
||||||
$form->text('favicon_url')->hint(OptionForm::AUTO_DETECT)
|
$form->text('favicon_url')->hint()->description();
|
||||||
->description(OptionForm::AUTO_DETECT);
|
|
||||||
|
|
||||||
$form->select('copyright_prefer')
|
$form->select('copyright_prefer')
|
||||||
->option('0', 'Powered with ❤ by Blessing Skin Server.')
|
->option('0', 'Powered with ❤ by Blessing Skin Server.')
|
||||||
|
|
@ -49,10 +44,9 @@ class AdminController extends Controller
|
||||||
->option('2', 'Proudly powered by Blessing Skin Server.')
|
->option('2', 'Proudly powered by Blessing Skin Server.')
|
||||||
->option('3', '由 Blessing Skin Server 强力驱动.')
|
->option('3', '由 Blessing Skin Server 强力驱动.')
|
||||||
->option('4', '自豪地采用 Blessing Skin Server.')
|
->option('4', '自豪地采用 Blessing Skin Server.')
|
||||||
->description(OptionForm::AUTO_DETECT);
|
->description();
|
||||||
|
|
||||||
$form->textarea('copyright_text')->rows(6)
|
$form->textarea('copyright_text')->rows(6)->description();
|
||||||
->description(OptionForm::AUTO_DETECT);
|
|
||||||
|
|
||||||
})->handle();
|
})->handle();
|
||||||
|
|
||||||
|
|
@ -60,7 +54,7 @@ class AdminController extends Controller
|
||||||
{
|
{
|
||||||
$form->textarea('custom_css', 'CSS')->rows(6);
|
$form->textarea('custom_css', 'CSS')->rows(6);
|
||||||
$form->textarea('custom_js', 'JavaScript')->rows(6);
|
$form->textarea('custom_js', 'JavaScript')->rows(6);
|
||||||
})->addMessage(OptionForm::AUTO_DETECT)->handle();
|
})->addMessage()->handle();
|
||||||
|
|
||||||
return view('admin.customize', ['forms' => compact('homepage', 'customJsCss')]);
|
return view('admin.customize', ['forms' => compact('homepage', 'customJsCss')]);
|
||||||
}
|
}
|
||||||
|
|
@ -69,18 +63,17 @@ class AdminController extends Controller
|
||||||
{
|
{
|
||||||
$rate = Option::form('rate', OptionForm::AUTO_DETECT, function($form)
|
$rate = Option::form('rate', OptionForm::AUTO_DETECT, function($form)
|
||||||
{
|
{
|
||||||
$form->group('score_per_storage')->text('score_per_storage')->addon(OptionForm::AUTO_DETECT);
|
$form->group('score_per_storage')->text('score_per_storage')->addon();
|
||||||
|
|
||||||
$form->group('private_score_per_storage')
|
$form->group('private_score_per_storage')
|
||||||
->text('private_score_per_storage')->addon(OptionForm::AUTO_DETECT)
|
->text('private_score_per_storage')->addon()->hint();
|
||||||
->hint(OptionForm::AUTO_DETECT);
|
|
||||||
|
|
||||||
$form->group('score_per_closet_item')
|
$form->group('score_per_closet_item')
|
||||||
->text('score_per_closet_item')->addon(OptionForm::AUTO_DETECT);
|
->text('score_per_closet_item')->addon();
|
||||||
|
|
||||||
$form->checkbox('return_score')->label(OptionForm::AUTO_DETECT);
|
$form->checkbox('return_score')->label();
|
||||||
|
|
||||||
$form->group('score_per_player')->text('score_per_player')->addon(OptionForm::AUTO_DETECT);
|
$form->group('score_per_player')->text('score_per_player')->addon();
|
||||||
|
|
||||||
$form->text('user_initial_score');
|
$form->text('user_initial_score');
|
||||||
|
|
||||||
|
|
@ -186,7 +179,7 @@ class AdminController extends Controller
|
||||||
return Datatables::of($users)->editColumn('email', function ($user) {
|
return Datatables::of($users)->editColumn('email', function ($user) {
|
||||||
return $user->email ?: 'EMPTY';
|
return $user->email ?: 'EMPTY';
|
||||||
})->editColumn('permission', function ($user) use ($permissionTextMap) {
|
})->editColumn('permission', function ($user) use ($permissionTextMap) {
|
||||||
return Arr::get($permissionTextMap, $user->permission);
|
return array_get($permissionTextMap, $user->permission);
|
||||||
})
|
})
|
||||||
->setRowId('uid')
|
->setRowId('uid')
|
||||||
->editColumn('score', 'vendor.admin-operations.users.score')
|
->editColumn('score', 'vendor.admin-operations.users.score')
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Session;
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Services\Repositories\UserRepository;
|
use App\Services\Repositories\UserRepository;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ use Utils;
|
||||||
use Storage;
|
use Storage;
|
||||||
use Response;
|
use Response;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use App\Events\GetPlayerJson;
|
use App\Events\GetPlayerJson;
|
||||||
use App\Events\PlayerProfileUpdated;
|
use App\Events\PlayerProfileUpdated;
|
||||||
use App\Exceptions\PrettyPageException;
|
use App\Exceptions\PrettyPageException;
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,8 @@
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use App;
|
|
||||||
use Utils;
|
use Utils;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use App\Events\EncryptUserPassword;
|
use App\Events\EncryptUserPassword;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
|
@ -97,7 +95,7 @@ class User extends Model
|
||||||
{
|
{
|
||||||
$responses = event(new EncryptUserPassword($rawPasswd, $user));
|
$responses = event(new EncryptUserPassword($rawPasswd, $user));
|
||||||
|
|
||||||
return Arr::get($responses, 0);
|
return array_get($responses, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,10 @@
|
||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use View;
|
|
||||||
use Event;
|
use Event;
|
||||||
use Utils;
|
use Utils;
|
||||||
use Validator;
|
|
||||||
use App\Events;
|
use App\Events;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use App\Exceptions\PrettyPageException;
|
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -35,7 +31,7 @@ class AppServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
Event::listen(Events\RenderingHeader::class, function($event) {
|
Event::listen(Events\RenderingHeader::class, function($event) {
|
||||||
// provide some application information for javascript
|
// provide some application information for javascript
|
||||||
$blessing = array_merge(Arr::except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
$blessing = array_merge(array_except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
||||||
'base_url' => url('/'),
|
'base_url' => url('/'),
|
||||||
'site_name' => option('site_name')
|
'site_name' => option('site_name')
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,7 +48,7 @@ class Database
|
||||||
$e->getMessage(), $e->getCode());
|
$e->getMessage(), $e->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->database = Arr::get($config, 'database', config('database.connections.mysql.database'));
|
$this->database = array_get($config, 'database', config('database.connections.mysql.database'));
|
||||||
$this->connection->query("SET names 'utf8'");
|
$this->connection->query("SET names 'utf8'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ namespace App\Services;
|
||||||
use Event;
|
use Event;
|
||||||
use Closure;
|
use Closure;
|
||||||
use App\Events;
|
use App\Events;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
|
|
||||||
class Hook
|
class Hook
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ namespace App\Services;
|
||||||
|
|
||||||
use ArrayAccess;
|
use ArrayAccess;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Illuminate\Contracts\Support\Arrayable;
|
use Illuminate\Contracts\Support\Arrayable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -79,7 +78,7 @@ class Plugin implements Arrayable, ArrayAccess
|
||||||
*/
|
*/
|
||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
return $this->packageInfoAttribute(Str::snake($name, '-'));
|
return $this->packageInfoAttribute(snake_case($name, '-'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,7 +86,7 @@ class Plugin implements Arrayable, ArrayAccess
|
||||||
*/
|
*/
|
||||||
public function __isset($name)
|
public function __isset($name)
|
||||||
{
|
{
|
||||||
return isset($this->{$name}) || $this->packageInfoAttribute(Str::snake($name, '-'));
|
return isset($this->{$name}) || $this->packageInfoAttribute(snake_case($name, '-'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user