update to laravel 9

This commit is contained in:
xiaomlove
2022-03-31 22:22:04 +08:00
parent 09350c06e2
commit 5f6b3ceb53
30 changed files with 3420 additions and 2517 deletions
+3 -2
View File
@@ -17,11 +17,12 @@ class Platform
*/
public function handle(Request $request, Closure $next)
{
if (empty(nexus()->getPlatform())) {
$platform = nexus()->getPlatform();
if (empty($platform)) {
throw new \InvalidArgumentException("Require platform header.");
}
if (!nexus()->isPlatformValid()) {
throw new \InvalidArgumentException("Invalid platform: " . CURRENT_PLATFORM);
throw new \InvalidArgumentException("Invalid platform: " . $platform);
}
return $next($request);
}
+8 -3
View File
@@ -2,7 +2,7 @@
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
@@ -10,7 +10,7 @@ class TrustProxies extends Middleware
/**
* The trusted proxies for this application.
*
* @var array|string|null
* @var array<int, string>|string|null
*/
protected $proxies;
@@ -19,5 +19,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
+22
View File
@@ -696,6 +696,16 @@ class SearchRepository extends BaseRepository
return true;
}
$log = "[UPDATE_TORRENT]: $id";
$result = $this->getTorrent($id);
if ($this->isEsResponseError($result)) {
do_log("$log, fail: " . nexus_json_encode($result), 'error');
return false;
}
if ($result['found'] === false) {
do_log("$log, not exists, do insert");
return $this->addTorrent($id);
}
$baseFields = $this->getTorrentBaseFields();
$torrent = Torrent::query()->findOrFail($id, array_merge(['id'], $baseFields));
$data = $this->buildTorrentBody($torrent);
@@ -733,6 +743,18 @@ class SearchRepository extends BaseRepository
return $this->syncTorrentTags($torrent);
}
public function getTorrent($id): callable|bool|array
{
if (!$this->enabled) {
return false;
}
$params = [
'index' => self::INDEX_NAME,
'id' => $this->getTorrentId($id),
];
return $this->es->get($params);
}
public function deleteTorrent(int $id): bool
{
if (!$this->enabled) {
+45 -34
View File
@@ -7,10 +7,12 @@ use App\Models\Poll;
use App\Models\PollAnswer;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Encryption\Encrypter;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Carbon\Carbon;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
class ToolRepository extends BaseRepository
{
@@ -134,26 +136,33 @@ class ToolRepository extends BaseRepository
}
do_log("Google drive info: clientId: $clientId, clientSecret: $clientSecret, refreshToken: $refreshToken, folderId: $folderId");
$client = new \Google_Client();
$client = new \Google\Client();
$client->setClientId($clientId);
$client->setClientSecret($clientSecret);
$client->refreshToken($refreshToken);
$service = new \Google_Service_Drive($client);
$adapter = new \Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter($service, $folderId);
$filesystem = new \League\Flysystem\Filesystem($adapter);
$service = new \Google\Service\Drive($client);
$adapter = new \Masbug\Flysystem\GoogleDriveAdapter($service, $folderId);
$filesystem = new \League\Flysystem\Filesystem($adapter, new \League\Flysystem\Config([\League\Flysystem\Config::OPTION_VISIBILITY => \League\Flysystem\Visibility::PRIVATE]));
$localAdapter = new \League\Flysystem\Local\LocalFilesystemAdapter('/');
$localFilesystem = new \League\Flysystem\Filesystem($localAdapter, [\League\Flysystem\Config::OPTION_VISIBILITY => \League\Flysystem\Visibility::PRIVATE]);
$filename = $backupResult['filename'];
$upload_result = $filesystem->put(basename($filename), fopen($filename, 'r'));
$backupResult['upload_result'] = $upload_result;
do_log("Final result: " . json_encode($backupResult));
$time = Carbon::now();
try {
$filesystem->writeStream(basename($filename), $localFilesystem->readStream($filename), new \League\Flysystem\Config());
$speed = !(float)$time->diffInSeconds() ? 0 :filesize($filename) / (float)$time->diffInSeconds();
$log = 'Elapsed time: '.$time->diffForHumans(null, true);
$log .= ', Speed: '. number_format($speed/1024,2) . ' KB/s';
do_log($log);
$backupResult['upload_result'] = 'success: ' .$log;
} catch (\Throwable $exception) {
$backupResult['upload_result'] = 'fail: ' . $exception->getMessage();
}
return $backupResult;
}
public function getEncrypter(string $key): Encrypter
{
return new Encrypter($key, 'AES-256-CBC');
}
/**
* @param $to
* @param $subject
@@ -162,38 +171,40 @@ class ToolRepository extends BaseRepository
*/
public function sendMail($to, $subject, $body): bool
{
do_log("to: $to, subject: $subject, body: $body");
$log = "[SEND_MAIL]";
do_log("$log, to: $to, subject: $subject, body: $body");
$factory = new EsmtpTransportFactory();
$smtp = Setting::get('smtp');
// Create the Transport
$encryption = null;
if (isset($smtp['encryption']) && in_array($smtp['encryption'], ['ssl', 'tls'])) {
$encryption = $smtp['encryption'];
}
$transport = (new \Swift_SmtpTransport($smtp['smtpaddress'], $smtp['smtpport'], $encryption))
->setUsername($smtp['accountname'])
->setPassword($smtp['accountpassword'])
;
// Create the Transport
$transport = $factory->create(new Dsn(
$encryption === 'tls' ? (($smtp['smtpport'] == 465) ? 'smtps' : 'smtp') : '',
$smtp['smtpaddress'],
$smtp['accountname'] ?? null,
$smtp['accountpassword'] ?? null,
$smtp['smtpport'] ?? null
));
// Create the Mailer using your created Transport
$mailer = new \Swift_Mailer($transport);
$mailer = new Mailer($transport);
// Create a message
$message = (new \Swift_Message($subject))
->setFrom($smtp['accountname'], Setting::get('basic.SITENAME'))
->setTo([$to])
->setBody($body, 'text/html')
$message = (new Email())
->from(new Address($smtp['accountname'], Setting::get('basic.SITENAME')))
->to($to)
->subject($subject)
->html($body)
;
// Send the message
try {
$result = $mailer->send($message);
if ($result == 0) {
do_log("send mail fail, unknown error", 'error');
return false;
}
$mailer->send($message);
return true;
} catch (\Exception $e) {
do_log("send email fail: " . $e->getMessage() . "\n" . $e->getTraceAsString(), 'error');
} catch (\Throwable $e) {
do_log("$log, fail: " . $e->getMessage() . "\n" . $e->getTraceAsString(), 'error');
return false;
}
}
+10 -12
View File
@@ -27,35 +27,33 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-mysqli": "*",
"ext-pcntl": "*",
"ext-redis": "*",
"ext-xml": "*",
"doctrine/dbal": "^3.1",
"fideloper/proxy": "^4.4",
"elasticsearch/elasticsearch": "^8.0",
"fruitcake/laravel-cors": "^2.0",
"geoip2/geoip2": "~2.0",
"guzzlehttp/guzzle": "~6.0",
"hashids/hashids": "^4.1",
"imdbphp/imdbphp": "^7.0",
"jeroen-g/explorer": "^2.5",
"laravel-lang/lang": "~7.0",
"laravel/framework": "^8.12",
"laravel/framework": "^9.0",
"laravel/octane": "^1.2",
"laravel/sanctum": "^2.10",
"laravel/scout": "^9.4",
"laravel/tinker": "^2.5",
"nao-pon/flysystem-google-drive": "^1.1",
"masbug/flysystem-google-drive-ext": "^2.0",
"orangehill/iseed": "^3.0",
"phpgangsta/googleauthenticator": "dev-master",
"rhilip/bencode": "^1.1",
"swiftmailer/swiftmailer": "^6.2"
"rhilip/bencode": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.5",
"spatie/laravel-ignition": "^1.0",
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^4.4",
"kitloong/laravel-migrations-generator": "^5.0",
"laravel/sail": "^1.0.1",
"laravel-lang/lang": "^10.2",
"laravel-lang/publisher": "^12.0",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3.3"
},
"autoload-dev": {
Generated
+2808 -1776
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -175,7 +175,7 @@ return [
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\GoogleDriveServiceProvider::class,
// App\Providers\GoogleDriveServiceProvider::class,
],
-16
View File
@@ -1,16 +0,0 @@
<?php
return [
'hosts' => [
[
'host' => env('ELASTICSEARCH_HOST','localhost'),
'port' => env('ELASTICSEARCH_PORT','9200'),
'scheme' => env('ELASTICSEARCH_SCHEME','https'),
'user' => env('ELASTICSEARCH_USER','elastic'),
'pass' => env('ELASTICSEARCH_PASS',''),
]
],
'ssl_verification' => env('ELASTICSEARCH_SSL_VERIFICATION', ''),
];
-34
View File
@@ -1,34 +0,0 @@
<?php
declare(strict_types=1);
return [
/*
* There are different options for the connection. Since Explorer uses the Elasticsearch PHP SDK
* under the hood, all the host configuration options of the SDK are applicable here. See
* https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/configuration.html
*/
'connection' => [
'host' => env('ELASTICSEARCH_HOST','localhost'),
'port' => env('ELASTICSEARCH_PORT','9200'),
'scheme' => env('ELASTICSEARCH_SCHEME','https'),
'user' => env('ELASTICSEARCH_USER','elastic'),
'pass' => env('ELASTICSEARCH_PASS',''),
],
/**
* An index may be defined on an Eloquent model or inline below. A more in depth explanation
* of the mapping possibilities can be found in the documentation of Explorer's repository.
*/
'indexes' => [
\App\Models\Torrent::class,
\App\Models\User::class,
],
/**
* You may opt to keep the old indices after the alias is pointed to a new index.
* A model is only using index aliases if it implements the Aliased interface.
*/
'prune_old_aliases' => true,
];
+68
View File
@@ -0,0 +1,68 @@
<?php
/*
* This file is part of the "laravel-lang/publisher" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <helldar@ai-rus.com>
*
* @copyright 2021 Andrey Helldar
*
* @license MIT
*
* @see https://github.com/Laravel-Lang/publisher
*/
declare(strict_types=1);
return [
/*
* Determines what type of files to use when updating language files.
*
* `true` means inline files will be used.
* `false` means that default files will be used.
*
* The difference between them can be seen here:
* @see https://github.com/Laravel-Lang/lang/blob/master/source/validation.php
* @see https://github.com/Laravel-Lang/lang/blob/master/source/validation-inline.php
*
* By default, `false`.
*/
'inline' => false,
/*
* Do arrays need to be aligned by keys before processing arrays?
*
* By default, true
*/
'alignment' => true,
// Key exclusion when combining.
'excludes' => [
// 'auth' => ['throttle'],
// 'pagination' => ['previous'],
// 'passwords' => ['reset', 'throttled', 'user'],
// '{locale}' => ['Confirm Password'],
],
/*
* Change key case.
*
* Available values:
*
* 0 - Case does not change
* 1 - camelCase
* 2 - snake_case
* 3 - kebab-case
* 4 - PascalCase
*
* By default, 0
*/
'case' => 0,
];
+1 -1
View File
@@ -35,7 +35,7 @@ return [
|
*/
'server' => env('OCTANE_SERVER', 'swoole'),
'server' => env('OCTANE_SERVER', 'roadrunner'),
/*
|--------------------------------------------------------------------------
+2 -29
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.5');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-30');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-31');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
@@ -15,30 +15,3 @@ if (!defined('RUNNING_IN_OCTANE')) {
define('RUNNING_IN_OCTANE', false);
}
}
//defined('CURRENT_SCRIPT') || define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true));
//defined('IS_ANNOUNCE') || define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce');
//
//defined('PLATFORM_ADMIN') || define('PLATFORM_ADMIN', 'admin');
//defined('PLATFORM_USER') || define('PLATFORM_USER', 'user');
//defined('PLATFORMS') || define('PLATFORMS', [PLATFORM_ADMIN, PLATFORM_USER]);
//defined('CURRENT_PLATFORM') || define('CURRENT_PLATFORM', $_SERVER['HTTP_PLATFORM'] ?? '');
//defined('IS_PLATFORM_ADMIN') || define('IS_PLATFORM_ADMIN', CURRENT_PLATFORM == PLATFORM_ADMIN);
//defined('IS_PLATFORM_USER') || define('IS_PLATFORM_USER', CURRENT_PLATFORM == PLATFORM_USER);
//
//
////define the REQUEST_ID
//if (!defined('REQUEST_ID')) {
// if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) {
// $requestId = $_SERVER['HTTP_X_REQUEST_ID'];
// } elseif (!empty($_SERVER['REQUEST_ID'])) {
// $requestId = $_SERVER['REQUEST_ID'];
// } else {
// $prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
// $prefix = substr(md5($prefix), 0, 4);
// // 4 + 23 = 27 characters, after replace '.', 26
// $requestId = str_replace('.', '', uniqid($prefix, true));
// $requestId .= bin2hex(random_bytes(3));
// }
// define('REQUEST_ID', $requestId);
//}
+5 -32
View File
@@ -1413,44 +1413,17 @@ function sent_mail($to,$fromname,$fromemail,$subject,$body,$type = "confirmation
*/
/**
* use swiftmailer instead
* use Symfony Mailer instead
*
* @since 1.6
* @since 1.7
* @author xiaomlove<1939737565@qq.com>
*/
$setting = get_setting('smtp');
// Create the Transport
$encryption = null;
if (isset($setting['encryption']) && in_array($setting['encryption'], ['ssl', 'tls'])) {
$encryption = $setting['encryption'];
}
$transport = (new Swift_SmtpTransport($setting['smtpaddress'], $setting['smtpport'], $encryption))
->setUsername($setting['accountname'])
->setPassword($setting['accountpassword'])
;
// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);
// Create a message
$message = (new Swift_Message($subject))
->setFrom($fromemail, $fromname)
->setTo([$to])
->setBody($body, 'text/html')
;
// Send the message
try {
$result = $mailer->send($message);
if ($result == 0) {
stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail']);
}
} catch (\Exception $e) {
do_log("send email fail: " . $e->getMessage() . ", trace: " . $e->getTraceAsString());
$toolRep = new \App\Repositories\ToolRepository();
$sendResult = $toolRep->sendMail($to, $subject, $body);
if ($sendResult === false) {
stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail']);
}
}
if ($showmsg) {
if ($type == "confirmation")
-73
View File
@@ -1,73 +0,0 @@
<?php
namespace Nexus\Core;
class Constant
{
/**
* @todo check RoadRunner environment
*/
public function define()
{
if (!empty($_SERVER['PWD']) && str_contains($_SERVER['PWD'], 'vendor/laravel/octane/bin')) {
$this->defineForOctane();
} else {
$this->defineForFPM();
}
$this->defineCommon();
}
private function defineForFPM()
{
defined('CURRENT_SCRIPT') || define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true));
defined('CURRENT_PLATFORM') || define('CURRENT_PLATFORM', $_SERVER['HTTP_PLATFORM'] ?? '');
$requestId = '';
if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) {
$requestId = $_SERVER['HTTP_X_REQUEST_ID'];
} elseif (!empty($_SERVER['REQUEST_ID'])) {
$requestId = $_SERVER['REQUEST_ID'];
}
define('REQUEST_ID', $requestId ?: $this->generateRequestId());
}
private function defineForOctane()
{
$request = request();
defined('CURRENT_SCRIPT') || define('CURRENT_SCRIPT', $request->header('script_filename', ''));
defined('CURRENT_PLATFORM') || define('CURRENT_PLATFORM', $request->header('platform', ''));
$requestId = $request->header('request_id', '');
define('REQUEST_ID', $requestId ?: $this->generateRequestId());
}
private function generateRequestId()
{
$prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
$prefix = substr(md5($prefix), 0, 4);
// 4 + 23 = 27 characters, after replace '.', 26
$requestId = str_replace('.', '', uniqid($prefix, true));
$requestId .= bin2hex(random_bytes(3));
return $requestId;
}
private function defineCommon()
{
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-14');
defined('ROOT_PATH') || define('ROOT_PATH', dirname(dirname(__DIR__)) . '/');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
defined('NEXUSWIKIURL') || define("NEXUSWIKIURL","https://doc.nexusphp.org");
defined('VERSION') || define("VERSION","Powered by <a href=\"aboutnexus.php\">".PROJECTNAME."</a>");
defined('THISTRACKER') || define("THISTRACKER","General");
defined('PLATFORM_ADMIN') || define('PLATFORM_ADMIN', 'admin');
defined('PLATFORM_USER') || define('PLATFORM_USER', 'user');
defined('PLATFORMS') || define('PLATFORMS', [PLATFORM_ADMIN, PLATFORM_USER]);
defined('IS_PLATFORM_ADMIN') || define('IS_PLATFORM_ADMIN', CURRENT_PLATFORM == PLATFORM_ADMIN);
defined('IS_PLATFORM_USER') || define('IS_PLATFORM_USER', CURRENT_PLATFORM == PLATFORM_USER);
defined('IS_ANNOUNCE') || define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce');
}
}
+1 -1
View File
@@ -128,7 +128,7 @@ class Install
public function listRequirementTableRows()
{
$gdInfo = function_exists('gd_info') ? gd_info() : [];
$extensions = ['ctype', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd'];
$extensions = ['ctype', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'pcntl'];
$tableRows = [];
$tableRows[] = [
'label' => 'PHP version',
+41
View File
@@ -0,0 +1,41 @@
{
"All rights reserved.": "All rights reserved.",
"Forbidden": "Forbidden",
"Go Home": "Go Home",
"Go to page :page": "Go to page :page",
"Hello!": "Hello!",
"If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.",
"If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
"Login": "Login",
"Logout": "Logout",
"Not Found": "Not Found",
"of": "of",
"Oh no": "Oh no",
"Page Expired": "Page Expired",
"Pagination Navigation": "Pagination Navigation",
"Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
"Regards": "Regards",
"Register": "Register",
"Reset Password": "Reset Password",
"Reset Password Notification": "Reset Password Notification",
"results": "results",
"Server Error": "Server Error",
"Service Unavailable": "Service Unavailable",
"Showing": "Showing",
"The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.",
"The :attribute must contain at least one number.": "The :attribute must contain at least one number.",
"The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.",
"The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.",
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute.",
"This action is unauthorized.": "This action is unauthorized.",
"This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.",
"to": "to",
"Toggle navigation": "Toggle navigation",
"Too Many Requests": "Too Many Requests",
"Unauthorized": "Unauthorized",
"Verify Email Address": "Verify Email Address",
"Whoops!": "Whoops!",
"You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account."
}
+1 -14
View File
@@ -1,20 +1,7 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];
+1 -14
View File
@@ -1,19 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'next' => 'Next &raquo;',
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];
+4 -17
View File
@@ -1,22 +1,9 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
'token' => 'This password reset token is invalid.',
'user' => 'We can\'t find a user with that email address.',
];
+103 -132
View File
@@ -1,155 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
'accepted' => 'The :attribute must be accepted.',
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
'array' => 'The :attribute must have between :min and :max items.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
'string' => 'The :attribute must be between :min and :max characters.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'array' => 'The :attribute must have more than :value items.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'numeric' => 'The :attribute must be greater than :value.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'string' => 'The :attribute must be greater than :value characters.',
'array' => 'The :attribute must have more than :value items.',
'string' => 'The :attribute must be greater than :value characters.',
],
'gte' => [
'numeric' => 'The :attribute must be greater than or equal :value.',
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
'string' => 'The :attribute must be greater than or equal :value characters.',
'array' => 'The :attribute must have :value items or more.',
'gte' => [
'array' => 'The :attribute must have :value items or more.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be greater than or equal to :value.',
'string' => 'The :attribute must be greater than or equal to :value characters.',
],
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'lt' => [
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'lt' => [
'array' => 'The :attribute must have less than :value items.',
'file' => 'The :attribute must be less than :value kilobytes.',
'numeric' => 'The :attribute must be less than :value.',
'file' => 'The :attribute must be less than :value kilobytes.',
'string' => 'The :attribute must be less than :value characters.',
'array' => 'The :attribute must have less than :value items.',
'string' => 'The :attribute must be less than :value characters.',
],
'lte' => [
'numeric' => 'The :attribute must be less than or equal :value.',
'file' => 'The :attribute must be less than or equal :value kilobytes.',
'string' => 'The :attribute must be less than or equal :value characters.',
'array' => 'The :attribute must not have more than :value items.',
'lte' => [
'array' => 'The :attribute must not have more than :value items.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be less than or equal to :value.',
'string' => 'The :attribute must be less than or equal to :value characters.',
],
'max' => [
'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [
'array' => 'The :attribute must not have more than :max items.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'numeric' => 'The :attribute must not be greater than :max.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'string' => 'The :attribute must not be greater than :max characters.',
'array' => 'The :attribute must not have more than :max items.',
'string' => 'The :attribute must not be greater than :max characters.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'array' => 'The :attribute must have at least :min items.',
'file' => 'The :attribute must be at least :min kilobytes.',
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
'string' => 'The :attribute must be at least :min characters.',
],
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'same' => 'The :attribute and :other must match.',
'size' => [
'same' => 'The :attribute and :other must match.',
'size' => [
'array' => 'The :attribute must contain :size items.',
'file' => 'The :attribute must be :size kilobytes.',
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
'string' => 'The :attribute must be :size characters.',
],
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.',
'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute must be a valid URL.',
'uuid' => 'The :attribute must be a valid UUID.',
'attributes' => [],
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];
+41
View File
@@ -0,0 +1,41 @@
{
"All rights reserved.": "版权所有。",
"Forbidden": "访问被拒绝",
"Go Home": "回首页",
"Go to page :page": "前往第 :page 页",
"Hello!": "您好!",
"If you did not create an account, no further action is required.": "如果您未注册帐号,请忽略此邮件。",
"If you did not request a password reset, no further action is required.": "如果您未申请重设密码,请忽略此邮件。",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "如果您单击「:actionText」按钮时遇到问题,请复制下方链接到浏览器中访问:",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "如果您单击「:actionText」按钮时遇到问题,请复制下方链接到浏览器中访问:",
"Login": "登录",
"Logout": "登出",
"Not Found": "页面不存在",
"of": "于",
"Oh no": "不好了",
"Page Expired": "页面会话已超时",
"Pagination Navigation": "分页导航",
"Please click the button below to verify your email address.": "请点击下面按钮验证您的 E-mail",
"Regards": "致敬",
"Register": "注册",
"Reset Password": "重置密码",
"Reset Password Notification": "重置密码通知",
"results": "结果",
"Server Error": "服务器错误",
"Service Unavailable": "服务不可用",
"Showing": "显示中",
"The :attribute must contain at least one letter.": ":attribute 至少包含一个字母。",
"The :attribute must contain at least one number.": ":attribute 至少包含一个数字。",
"The :attribute must contain at least one symbol.": ":attribute 至少包含一个符号。",
"The :attribute must contain at least one uppercase and one lowercase letter.": ":attribute 至少包含一个大写字母和一个小写字母。",
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "给定的 :attribute 出现在数据泄漏中。请选择不同的 :attribute。",
"This action is unauthorized.": "权限不足。",
"This password reset link will expire in :count minutes.": "这个重设密码链接将会在 :count 分钟后失效。",
"to": "至",
"Toggle navigation": "切换导航",
"Too Many Requests": "请求次数过多。",
"Unauthorized": "未授权",
"Verify Email Address": "验证 E-mail",
"Whoops!": "哎呀!",
"You are receiving this email because we received a password reset request for your account.": "您收到此电子邮件是因为我们收到了您帐户的密码重设请求。"
}
+2 -12
View File
@@ -1,17 +1,7 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => '用户名或密码错误',
'failed' => '用户名或密码错误。',
'password' => '密码错误。',
'throttle' => '您尝试的登录次数过多,请 :seconds 秒后再试。',
];
+1 -12
View File
@@ -1,17 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; 上一页',
'next' => '下一页 &raquo;',
'previous' => '&laquo; 上一页',
];
-11
View File
@@ -1,17 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => '密码重置成功!',
'sent' => '密码重置邮件已发送!',
'throttled' => '请稍候再试。',
+117 -141
View File
@@ -1,102 +1,102 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => '您必须接受 :attribute。',
'active_url' => ':attribute 不是一个有效的网址。',
'after' => ':attribute 必须要晚于 :date。',
'after_or_equal' => ':attribute 必须要等于 :date 或更晚。',
'alpha' => ':attribute 只能由字母组成。',
'alpha_dash' => ':attribute 只能由字母、数字、短划线(-)和下划线(_)组成。',
'alpha_num' => ':attribute 只能由字母和数字组成。',
'array' => ':attribute 必须是一个数组。',
'before' => ':attribute 必须要早于 :date。',
'before_or_equal' => ':attribute 必须要等于 :date 或更早。',
'between' => [
'numeric' => ':attribute 必须介于 :min - :max 之间。',
'file' => ':attribute 必须介于 :min - :max KB 之间。',
'string' => ':attribute 必须介于 :min - :max 个字符之间。',
'accepted' => '您必须接受 :attribute。',
'accepted_if' => '当 :other 为 :value 时,必须接受 :attribute。',
'active_url' => ':attribute 不是一个有效的网址。',
'after' => ':attribute 必须要晚于 :date。',
'after_or_equal' => ':attribute 必须要等于 :date 或更晚。',
'alpha' => ':attribute 只能由字母组成。',
'alpha_dash' => ':attribute 只能由字母、数字、短划线(-)和下划线(_)组成。',
'alpha_num' => ':attribute 只能由字母和数字组成。',
'array' => ':attribute 必须是一个数组。',
'before' => ':attribute 必须要早于 :date。',
'before_or_equal' => ':attribute 必须要等于 :date 或更早。',
'between' => [
'array' => ':attribute 必须只有 :min - :max 个单元。',
'file' => ':attribute 必须介于 :min - :max KB 之间。',
'numeric' => ':attribute 必须介于 :min - :max 之间。',
'string' => ':attribute 必须介于 :min - :max 个字符之间。',
],
'boolean' => ':attribute 必须为布尔值。',
'confirmed' => ':attribute 两次输入不一致。',
'date' => ':attribute 不是一个有效的日期。',
'date_equals' => ':attribute 必须要等于 :date。',
'date_format' => ':attribute 的格式必须为 :format。',
'different' => ':attribute 和 :other 必须不同。',
'digits' => ':attribute 必须是 :digits 位数字。',
'digits_between' => ':attribute 必须是介于 :min 和 :max 位的数字。',
'dimensions' => ':attribute 图片尺寸不正确。',
'distinct' => ':attribute 已经存在。',
'email' => ':attribute 不是一个合法的邮箱。',
'ends_with' => ':attribute 必须以 :values 为结尾。',
'exists' => ':attribute 存在。',
'file' => ':attribute 必须是文件。',
'filled' => ':attribute 不能为空。',
'gt' => [
'numeric' => ':attribute 必须大于 :value。',
'file' => ':attribute 必须大于 :value KB。',
'string' => ':attribute 必须多于 :value 个字符。',
'boolean' => ':attribute 必须为布尔值。',
'confirmed' => ':attribute 两次输入不一致。',
'current_password' => '密码错误。',
'date' => ':attribute 不是一个有效的日期。',
'date_equals' => ':attribute 必须要等于 :date。',
'date_format' => ':attribute 的格式必须为 :format。',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => ':attribute 和 :other 必须不同。',
'digits' => ':attribute 必须是 :digits 位数字。',
'digits_between' => ':attribute 必须是介于 :min 和 :max 位的数字。',
'dimensions' => ':attribute 图片尺寸不正确。',
'distinct' => ':attribute 已经存在。',
'email' => ':attribute 不是一个合法的邮箱。',
'ends_with' => ':attribute 必须以 :values 为结尾。',
'enum' => 'The selected :attribute is invalid.',
'exists' => ':attribute 不存在。',
'file' => ':attribute 必须是文件。',
'filled' => ':attribute 不能为空。',
'gt' => [
'array' => ':attribute 必须多于 :value 个元素。',
'file' => ':attribute 必须大于 :value KB。',
'numeric' => ':attribute 必须大于 :value。',
'string' => ':attribute 必须多于 :value 个字符。',
],
'gte' => [
'numeric' => ':attribute 必须大于或等于 :value。',
'file' => ':attribute 必须大于或等于 :value KB。',
'string' => ':attribute 必须多于或等于 :value 个字符。',
'gte' => [
'array' => ':attribute 必须多于或等于 :value 个元素。',
'file' => ':attribute 必须大于或等于 :value KB。',
'numeric' => ':attribute 必须大于或等于 :value。',
'string' => ':attribute 必须多于或等于 :value 个字符。',
],
'image' => ':attribute 必须是图片。',
'in' => '已选的属性 :attribute 无效。',
'in_array' => ':attribute 必须在 :other 中。',
'integer' => ':attribute 必须是整数。',
'ip' => ':attribute 必须是有效的 IP 地址。',
'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
'json' => ':attribute 必须是正确的 JSON 格式。',
'lt' => [
'numeric' => ':attribute 必须小于 :value。',
'file' => ':attribute 必须小于 :value KB。',
'string' => ':attribute 必须少于 :value 个字符。',
'image' => ':attribute 必须是图片。',
'in' => '已选的属性 :attribute 无效。',
'in_array' => ':attribute 必须在 :other 中。',
'integer' => ':attribute 必须是整数。',
'ip' => ':attribute 必须是有效的 IP 地址。',
'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
'json' => ':attribute 必须是正确的 JSON 格式。',
'lt' => [
'array' => ':attribute 必须少于 :value 个元素。',
'file' => ':attribute 必须小于 :value KB。',
'numeric' => ':attribute 必须小于 :value。',
'string' => ':attribute 必须少于 :value 个字符。',
],
'lte' => [
'numeric' => ':attribute 必须小于或等于 :value。',
'file' => ':attribute 必须小于或等于 :value KB。',
'string' => ':attribute 必须少于或等于 :value 个字符。',
'lte' => [
'array' => ':attribute 必须少于或等于 :value 个元素。',
'file' => ':attribute 必须小于或等于 :value KB。',
'numeric' => ':attribute 必须小于或等于 :value。',
'string' => ':attribute 必须少于或等于 :value 个字符。',
],
'max' => [
'numeric' => ':attribute 不能大于 :max。',
'file' => ':attribute 不能大于 :max KB。',
'string' => ':attribute 不能大于 :max 个字符。',
'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [
'array' => ':attribute 最多只有 :max 个单元。',
'file' => ':attribute 不能大于 :max KB。',
'numeric' => ':attribute 不能大于 :max。',
'string' => ':attribute 不能大于 :max 个字符。',
],
'mimes' => ':attribute 必须是一个 :values 类型的文件。',
'mimetypes' => ':attribute 必须是一个 :values 类型的文件。',
'min' => [
'numeric' => ':attribute 必须大于等于 :min。',
'file' => ':attribute 大小不能小于 :min KB。',
'string' => ':attribute 至少为 :min 个字符。',
'mimes' => ':attribute 必须是一个 :values 类型的文件。',
'mimetypes' => ':attribute 必须是一个 :values 类型的文件。',
'min' => [
'array' => ':attribute 至少有 :min 个单元。',
'file' => ':attribute 大小不能小于 :min KB。',
'numeric' => ':attribute 必须大于等于 :min。',
'string' => ':attribute 至少为 :min 个字符。',
],
'multiple_of' => 'The :attribute must be a multiple of :value',
'multiple_of' => ':attribute 必须是 :value 中的多个值。',
'not_in' => '已选的属性 :attribute 非法。',
'not_regex' => ':attribute 的格式错误。',
'numeric' => ':attribute 必须是一个数字。',
'password' => '密码错误',
'present' => ':attribute 必须存在。',
'prohibited' => ':attribute 字段被禁止。',
'prohibited_if' => '当 :other 为 :value 时,禁止 :attribute 字段。',
'prohibited_unless' => ':attribute 字段被禁止,除非 :other 位于 :values 中。',
'prohibits' => ':attribute 字段禁止出现 :other。',
'regex' => ':attribute 格式不正确。',
'required' => ':attribute 不能为空。',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => '当 :other 为 :value 时 :attribute 不能为空。',
'required_unless' => '当 :other 不为 :values 时 :attribute 不能为空。',
'required_with' => '当 :values 存在时 :attribute 不能为空。',
@@ -105,76 +105,52 @@ return [
'required_without_all' => '当 :values 都不存在时 :attribute 不能为空。',
'same' => ':attribute 和 :other 必须相同。',
'size' => [
'numeric' => ':attribute 大小必须为 :size。',
'file' => ':attribute 大小必须为 :size KB。',
'string' => ':attribute 必须是 :size 个字符。',
'array' => ':attribute 必须为 :size 个单元。',
'file' => ':attribute 大小必须为 :size KB。',
'numeric' => ':attribute 大小必须为 :size。',
'string' => ':attribute 必须是 :size 个字符。',
],
'starts_with' => ':attribute 必须以 :values 为开头。',
'string' => ':attribute 必须是一个字符串。',
'timezone' => ':attribute 必须是一个合法的时区值。',
'unique' => ':attribute 已经存在。',
'uploaded' => ':attribute 上传失败。',
'url' => ':attribute 格式不正确。',
'uuid' => ':attribute 必须是有效的 UUID。',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'starts_with' => ':attribute 必须以 :values 为开头。',
'string' => ':attribute 必须是一个字符串。',
'timezone' => ':attribute 必须是一个合法的时区值。',
'unique' => ':attribute 已经存在。',
'uploaded' => ':attribute 上传失败。',
'url' => ':attribute 格式不正确。',
'uuid' => ':attribute 必须是有效的 UUID。',
'attributes' => [
'address' => '地址',
'age' => '年龄',
'available' => '可用的',
'city' => '城市',
'content' => '内容',
'country' => '国家',
'date' => '日期',
'day' => '天',
'description' => '描述',
'email' => '邮箱',
'excerpt' => '摘要',
'first_name' => '名',
'gender' => '性别',
'hour' => '时',
'last_name' => '姓',
'minute' => '分',
'mobile' => '手机',
'month' => '月',
'name' => '名称',
'password' => '密码',
'password_confirmation' => '确认密码',
'phone' => '电话',
'second' => '秒',
'sex' => '性别',
'size' => '大小',
'time' => '时间',
'title' => '标题',
'username' => '用户名',
'year' => '年',
],
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [
'name' => '名称',
'username' => '用户名',
'email' => '邮箱',
'first_name' => '名',
'last_name' => '姓',
'password' => '密码',
'password_confirmation' => '确认密码',
'city' => '城市',
'country' => '国家',
'address' => '地址',
'phone' => '电话',
'mobile' => '手机',
'age' => '年龄',
'sex' => '性别',
'gender' => '性别',
'day' => '天',
'month' => '月',
'year' => '年',
'hour' => '时',
'minute' => '分',
'second' => '秒',
'title' => '标题',
'content' => '内容',
'description' => '描述',
'excerpt' => '摘要',
'date' => '日期',
'time' => '时间',
'available' => '可用的',
'size' => '大小',
],
];
+41
View File
@@ -0,0 +1,41 @@
{
"All rights reserved.": "版權所有。",
"Forbidden": "訪問被拒絕",
"Go Home": "回首頁",
"Go to page :page": "前往第 :page 頁",
"Hello!": "您好!",
"If you did not create an account, no further action is required.": "如果您未註冊帳號,請忽略此郵件。",
"If you did not request a password reset, no further action is required.": "如果您未申請重設密碼,請忽略此郵件。",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "如果您點擊「:actionText」按鈕時出現問題,請複製下方連結至瀏覽器中貼上:",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "如果您點擊「:actionText」按鈕時出現問題,請複製下方連結至瀏覽器中貼上:",
"Login": "登入",
"Logout": "登出",
"Not Found": "找不到頁面",
"of": "於",
"Oh no": "不好了",
"Page Expired": "頁面會話已超時",
"Pagination Navigation": "分頁導航",
"Please click the button below to verify your email address.": "請點擊下方按鈕驗證您的電子郵件:",
"Regards": "致敬",
"Register": "註冊",
"Reset Password": "重設密碼",
"Reset Password Notification": "重設密碼通知",
"results": "結果",
"Server Error": "伺服器錯誤",
"Service Unavailable": "暫時不提供服務",
"Showing": "顯示中",
"The :attribute must contain at least one letter.": ":attribute 至少包含一個字母。",
"The :attribute must contain at least one number.": ":attribute 至少包含一個數字。",
"The :attribute must contain at least one symbol.": ":attribute 至少包含一個符號。",
"The :attribute must contain at least one uppercase and one lowercase letter.": ":attribute 至少包含一個大寫和一個小寫字母。",
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "給定的 :attribute 出現在數據洩漏中。 請選擇不同的 :attribute。",
"This action is unauthorized.": "權限不足。",
"This password reset link will expire in :count minutes.": "這個重設密碼連結將會在 :count 分鐘後失效。",
"to": "至",
"Toggle navigation": "切換導航",
"Too Many Requests": "請求次數過多。",
"Unauthorized": "未授權",
"Verify Email Address": "驗證電子郵件",
"Whoops!": "哎呀!",
"You are receiving this email because we received a password reset request for your account.": "您收到此電子郵件是因為我們收到了您帳戶的密碼重設請求。"
}
+2 -12
View File
@@ -1,17 +1,7 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => '使用者名稱或密碼錯誤',
'failed' => '使用者名稱或密碼錯誤。',
'password' => '密碼錯誤。',
'throttle' => '嘗試登入太多次,請在 :seconds 秒後再試。',
];
+1 -12
View File
@@ -1,17 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; 上一頁',
'next' => '下一頁 &raquo;',
'previous' => '&laquo; 上一頁',
];
-11
View File
@@ -1,17 +1,6 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => '密碼已成功重設!',
'sent' => '密碼重設郵件已發送!',
'throttled' => '請稍候再試。',
+91 -115
View File
@@ -1,102 +1,102 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => '必須接受 :attribute。',
'active_url' => ':attribute 不是有效的網址。',
'after' => ':attribute 必須要晚於 :date。',
'after_or_equal' => ':attribute 必須要等於 :date 或更晚。',
'alpha' => ':attribute 只能以字母組成。',
'alpha_dash' => ':attribute 只能以字母、數字、連接線(-)及底線(_)組成。',
'alpha_num' => ':attribute 只能以字母及數字組成。',
'array' => ':attribute 必須為陣列。',
'before' => ':attribute 必須要早於 :date。',
'before_or_equal' => ':attribute 必須要等於 :date 或更早。',
'between' => [
'numeric' => ':attribute 必須介於 :min 至 :max 之間。',
'file' => ':attribute 必須介於 :min 至 :max KB 之間。 ',
'string' => ':attribute 必須介於 :min 至 :max 個字元之間。',
'accepted' => '必須接受 :attribute。',
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
'active_url' => ':attribute 不是有效的網址。',
'after' => ':attribute 必須要晚於 :date。',
'after_or_equal' => ':attribute 必須要等於 :date 或更晚。',
'alpha' => ':attribute 只能以字母組成。',
'alpha_dash' => ':attribute 只能以字母、數字、連接線(-)及底線(_)組成。',
'alpha_num' => ':attribute 只能以字母及數字組成。',
'array' => ':attribute 必須為陣列。',
'before' => ':attribute 必須要早於 :date。',
'before_or_equal' => ':attribute 必須要等於 :date 或更早。',
'between' => [
'array' => ':attribute: 必須有 :min - :max 個元素。',
'file' => ':attribute 必須介於 :min 至 :max KB 之間。 ',
'numeric' => ':attribute 必須介於 :min 至 :max 之間。',
'string' => ':attribute 必須介於 :min 至 :max 個字元之間。',
],
'boolean' => ':attribute 必須為布林值。',
'confirmed' => ':attribute 確認欄位的輸入不一致。',
'date' => ':attribute 不是有效的日期。',
'date_equals' => ':attribute 必須等於 :date。',
'date_format' => ':attribute 不符合 :format 的格式。',
'different' => ':attribute 與 :other 必須不同。',
'digits' => ':attribute 必須是 :digits 位數字。',
'digits_between' => ':attribute 必須介於 :min 至 :max 位數字。',
'dimensions' => ':attribute 圖片尺寸不正確。',
'distinct' => ':attribute 已經存在。',
'email' => ':attribute 必須是有效的 E-mail。',
'ends_with' => ':attribute 結尾必須包含下列之一::values。',
'exists' => ':attribute 存在。',
'file' => ':attribute 必須是有效的檔案。',
'filled' => ':attribute 不能留空。',
'gt' => [
'numeric' => ':attribute 必須大於 :value。',
'file' => ':attribute 必須大於 :value KB。',
'string' => ':attribute 必須多於 :value 個字元。',
'boolean' => ':attribute 必須為布林值。',
'confirmed' => ':attribute 確認欄位的輸入不一致。',
'current_password' => 'The password is incorrect.',
'date' => ':attribute 不是有效的日期。',
'date_equals' => ':attribute 必須等於 :date。',
'date_format' => ':attribute 不符合 :format 的格式。',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => ':attribute 與 :other 必須不同。',
'digits' => ':attribute 必須是 :digits 位數字。',
'digits_between' => ':attribute 必須介於 :min 至 :max 位數字。',
'dimensions' => ':attribute 圖片尺寸不正確。',
'distinct' => ':attribute 已經存在。',
'email' => ':attribute 必須是有效的 E-mail。',
'ends_with' => ':attribute 結尾必須包含下列之一::values。',
'enum' => 'The selected :attribute is invalid.',
'exists' => ':attribute 不存在。',
'file' => ':attribute 必須是有效的檔案。',
'filled' => ':attribute 不能留空。',
'gt' => [
'array' => ':attribute 必須多於 :value 個元素。',
'file' => ':attribute 必須大於 :value KB。',
'numeric' => ':attribute 必須大於 :value。',
'string' => ':attribute 必須多於 :value 個字元。',
],
'gte' => [
'numeric' => ':attribute 必須大於或等於 :value。',
'file' => ':attribute 必須大於或等於 :value KB。',
'string' => ':attribute 必須多於或等於 :value 個字元。',
'gte' => [
'array' => ':attribute 必須多於或等於 :value 個元素。',
'file' => ':attribute 必須大於或等於 :value KB。',
'numeric' => ':attribute 必須大於或等於 :value。',
'string' => ':attribute 必須多於或等於 :value 個字元。',
],
'image' => ':attribute 必須是一張圖片。',
'in' => '所選擇的 :attribute 選項無效。',
'in_array' => ':attribute 沒有在 :other 中。',
'integer' => ':attribute 必須是一個整數。',
'ip' => ':attribute 必須是一個有效的 IP 位址。',
'ipv4' => ':attribute 必須是一個有效的 IPv4 位址。',
'ipv6' => ':attribute 必須是一個有效的 IPv6 位址。',
'json' => ':attribute 必須是正確的 JSON 字串。',
'lt' => [
'numeric' => ':attribute 必須小於 :value。',
'file' => ':attribute 必須小於 :value KB。',
'string' => ':attribute 必須少於 :value 個字元。',
'image' => ':attribute 必須是一張圖片。',
'in' => '所選擇的 :attribute 選項無效。',
'in_array' => ':attribute 沒有在 :other 中。',
'integer' => ':attribute 必須是一個整數。',
'ip' => ':attribute 必須是一個有效的 IP 位址。',
'ipv4' => ':attribute 必須是一個有效的 IPv4 位址。',
'ipv6' => ':attribute 必須是一個有效的 IPv6 位址。',
'json' => ':attribute 必須是正確的 JSON 字串。',
'lt' => [
'array' => ':attribute 必須少於 :value 個元素。',
'file' => ':attribute 必須小於 :value KB。',
'numeric' => ':attribute 必須小於 :value。',
'string' => ':attribute 必須少於 :value 個字元。',
],
'lte' => [
'numeric' => ':attribute 必須小於或等於 :value。',
'file' => ':attribute 必須小於或等於 :value KB。',
'string' => ':attribute 必須少於或等於 :value 個字元。',
'lte' => [
'array' => ':attribute 必須少於或等於 :value 個元素。',
'file' => ':attribute 必須小於或等於 :value KB。',
'numeric' => ':attribute 必須小於或等於 :value。',
'string' => ':attribute 必須少於或等於 :value 個字元。',
],
'max' => [
'numeric' => ':attribute 不能大於 :max。',
'file' => ':attribute 不能大於 :max KB。',
'string' => ':attribute 不能多於 :max 個字元。',
'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [
'array' => ':attribute 最多有 :max 個元素。',
'file' => ':attribute 不能大於 :max KB。',
'numeric' => ':attribute 不能大於 :max。',
'string' => ':attribute 不能多於 :max 個字元。',
],
'mimes' => ':attribute 必須為 :values 的檔案。',
'mimetypes' => ':attribute 必須為 :values 的檔案。',
'min' => [
'numeric' => ':attribute 不能小於 :min。',
'file' => ':attribute 不能小於 :min KB。',
'string' => ':attribute 不能小於 :min 個字元。',
'mimes' => ':attribute 必須為 :values 的檔案。',
'mimetypes' => ':attribute 必須為 :values 的檔案。',
'min' => [
'array' => ':attribute 至少有 :min 個元素。',
'file' => ':attribute 不能小於 :min KB。',
'numeric' => ':attribute 不能小於 :min。',
'string' => ':attribute 不能小於 :min 個字元。',
],
'multiple_of' => 'The :attribute must be a multiple of :value',
'multiple_of' => '所選擇的 :attribute 必須為 :value 中的多個。',
'not_in' => '所選擇的 :attribute 選項無效。',
'not_regex' => ':attribute 的格式錯誤。',
'numeric' => ':attribute 必須為一個數字。',
'password' => '密碼錯誤',
'present' => ':attribute 必須存在。',
'prohibited' => ':attribute 字段被禁止。',
'prohibited_if' => '当 :other 为 :value 时,:attribute字段被禁止。',
'prohibited_unless' => ':attribute 字段被禁止,除非 :other 在 :values 中。',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => ':attribute 的格式錯誤。',
'required' => ':attribute 不能留空。',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => '當 :other 是 :value 時 :attribute 不能留空。',
'required_unless' => '當 :other 不是 :values 時 :attribute 不能留空。',
'required_with' => '當 :values 出現時 :attribute 不能留空。',
@@ -105,48 +105,19 @@ return [
'required_without_all' => '當 :values 都不出現時 :attribute 不能留空。',
'same' => ':attribute 與 :other 必須相同。',
'size' => [
'numeric' => ':attribute 的大小必須是 :size。',
'file' => ':attribute 的大小必須是 :size KB。',
'string' => ':attribute 必須是 :size 個字元。',
'array' => ':attribute 必須是 :size 個元素。',
'file' => ':attribute 的大小必須是 :size KB。',
'numeric' => ':attribute 的大小必須是 :size。',
'string' => ':attribute 必須是 :size 個字元。',
],
'starts_with' => ':attribute 開頭必須包含下列之一::values。',
'string' => ':attribute 必須是一個字串。',
'timezone' => ':attribute 必須是一個正確的時區值。',
'unique' => ':attribute 已經存在。',
'uploaded' => ':attribute 上傳失敗。',
'url' => ':attribute 的格式錯誤。',
'uuid' => ':attribute 必須是有效的 UUID。',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [
'starts_with' => ':attribute 開頭必須包含下列之一::values。',
'string' => ':attribute 必須是一個字串。',
'timezone' => ':attribute 必須是一個正確的時區值。',
'unique' => ':attribute 已經存在。',
'uploaded' => ':attribute 上傳失敗。',
'url' => ':attribute 的格式錯誤。',
'uuid' => ':attribute 必須是有效的 UUID。',
'attributes' => [
'address' => '地址',
'age' => '年齡',
'available' => '可用的',
@@ -177,4 +148,9 @@ return [
'username' => '使用者名稱',
'year' => '年',
],
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
];