mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
Upgrade to Laravel 6
This commit is contained in:
parent
21c28c8b1c
commit
deab8be4a8
@ -4,7 +4,6 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Cache;
|
||||
use Redis;
|
||||
use Option;
|
||||
use Notification;
|
||||
use Carbon\Carbon;
|
||||
@ -18,6 +17,7 @@ use App\Services\OptionForm;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\PluginManager;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
@ -209,11 +209,11 @@ class AdminController extends Controller
|
||||
$form->text('site_url')
|
||||
->hint()
|
||||
->format(function ($url) {
|
||||
if (ends_with($url, '/')) {
|
||||
if (Str::endsWith($url, '/')) {
|
||||
$url = substr($url, 0, -1);
|
||||
}
|
||||
|
||||
if (ends_with($url, '/index.php')) {
|
||||
if (Str::endsWith($url, '/index.php')) {
|
||||
$url = substr($url, 0, -10);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"ext-json": "*",
|
||||
"predis/predis": "~1.0",
|
||||
"doctrine/inflector": "1.1.0",
|
||||
"laravel/framework": "5.8.*",
|
||||
"laravel/framework": "^6.0",
|
||||
"nesbot/carbon": "^2.0",
|
||||
"composer/semver": "^1.4",
|
||||
"gregwar/captcha": "1.*",
|
||||
|
428
composer.lock
generated
428
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -212,7 +212,6 @@ return [
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
|
@ -106,15 +106,34 @@ return [
|
||||
|
||||
'redis' => [
|
||||
|
||||
'cluster' => false,
|
||||
// Phpredis is recommended,
|
||||
// however, most of Blessing Skin users don't use redis,
|
||||
// so keep `predis` as default value.
|
||||
// Otherwise, an error will be thrown if phpredis is not installed.
|
||||
'client' => env('REDIS_CLIENT', 'predis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env(
|
||||
'REDIS_PREFIX',
|
||||
Illuminate\Support\Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'
|
||||
),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'scheme' => env('REDIS_SCHEME', 'tcp'),
|
||||
'host' => env('REDIS_HOST', 'localhost'),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'path' => env('REDIS_SOCKET_PATH'),
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'database' => 0,
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_DB', 0),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_CACHE_DB', 1),
|
||||
],
|
||||
|
||||
],
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Tests;
|
||||
|
||||
use Cache;
|
||||
use Redis;
|
||||
use Mockery;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user