mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
torrent request
This commit is contained in:
34
app/Http/Requests/TorrentRequest.php
Normal file
34
app/Http/Requests/TorrentRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TorrentRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
$user = $this->user();
|
||||
return $user->uploadpos == "yes";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"descr" => "required",
|
||||
"type" => "required",
|
||||
"name" => "required",
|
||||
"file" => "required|file",
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,15 @@ return [
|
||||
'checkout_not_pass_message_content' => 'You did not complete the exam: :exam_name in time(:begin ~ :end), and your account has be banned!',
|
||||
'ban_log_reason' => 'Not complete exam: :exam_name in time(:begin ~ :end)',
|
||||
'ban_user_modcomment' => 'Due to not complete exam: :exam_name(:begin ~ :end), ban by system.',
|
||||
'admin' => [
|
||||
'list' => [
|
||||
'page_title' => 'Exam List'
|
||||
]
|
||||
],
|
||||
'recurring' => 'recurring',
|
||||
'recurring_weekly' => 'once a week',
|
||||
'recurring_monthly' => 'once a month',
|
||||
'recurring_help' => 'If specified as periodic, the appraisal start time is the start time of the current cycle, and the end time is the end time of the current cycle, which is said to be the natural week/month. At the end of each cycle, if the user still meets the screening criteria, the user will be automatically assigned to the next cycle.' ,
|
||||
|
||||
'time_condition_invalid' => 'The time parameter does not make sense, there are and only one of three items: start time + end time / duration / recurring',
|
||||
];
|
||||
|
||||
@@ -28,4 +28,15 @@ return [
|
||||
'checkout_not_pass_message_content' => '你在規定時間內(:begin ~ :end)未完成考核::exam_name,賬號已被禁用。',
|
||||
'ban_log_reason' => '未完成考核::exam_name(:begin ~ :end)',
|
||||
'ban_user_modcomment' => '未完成考核: :exam_name(:begin ~ :end), 被系統禁用.',
|
||||
'admin' => [
|
||||
'list' => [
|
||||
'page_title' => '考核列表'
|
||||
]
|
||||
],
|
||||
'recurring' => '周期性',
|
||||
'recurring_weekly' => '每周一次',
|
||||
'recurring_monthly' => '每月一次',
|
||||
'recurring_help' => '如果指定為周期性,考核開始時間為當前周期的開始時間,結束時間為當前周期的結束時間,這裏說的都是自然周/月。每個周期結束後,如果用戶仍然滿足篩選條件,會自動為用戶分配下個周期的任務。',
|
||||
|
||||
'time_condition_invalid' => '時間參數不合理,有且只有三項之一:開始時間+結束時間/時長/周期性',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user