PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/app/Laravel/Requests/Backoffice/NewsRequest.php

https://bitbucket.org/cityserv/techreportph
PHP | 26 lines | 19 code | 6 blank | 1 comment | 0 complexity | e0919f5c73917e4e31c3de480eba0aec MD5 | raw file
 1<?php namespace App\Laravel\Requests\Backoffice;
 2
 3use Session,Auth, Input;
 4use App\Laravel\Requests\RequestManager;
 5
 6class NewsRequest extends RequestManager{
 7
 8	public function rules(){
 9
10		$rules = [
11			'title' => "required",
12			'author' => "required",
13			'content' => "required",
14			// 'sort' => "required",
15			'file' => "required|image",
16		];
17
18		return $rules;
19	}
20
21	public function messages(){
22		return [
23			'required' => "This field is required.",
24		];
25	}
26}