1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/5/10 0010
- * Time: 14:13
- */
- namespace App\Http\Requests\Report;
- use App\Http\Requests\Request;
- class ContractRequest extends Request
- {
- /**
- * Determine if the user is authorized to make this request.
- *
- * @return bool
- */
- public function authorize()
- {
- return true;
- }
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules()
- {
- if (!$this->ajax()) {
- return [];
- }
- return [
- 'key_num' => 'nullable|numeric',
- 'article_num' => 'nullable|numeric',
- 'link_num' => 'nullable|numeric'
- ];
- }
- public function attributes()
- {
- return [
- 'key_num' => '关键词合同数',
- 'article_num' => '软文合同数',
- 'link_num' => '营销合同数',
- ];
- }
- }
|