Created
May 31, 2018 01:40
-
-
Save maxca/805e75b561bfa0c26223f92a607e3015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @author samark chaisanguan | |
| * @email samarkchsngn@gmail.com | |
| */ | |
| namespace App\Http\Requests\Blog; | |
| use Lumpineevill\Request\APIRequest; | |
| class CreateBlogRequest extends APIRequest | |
| { | |
| /** | |
| * 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. | |
| * simple rule below this. | |
| * required | exists | required_if | email | interger | date| date_format | between | array | json | boolean | | |
| * max | min | confirmed | differece | alpha | alpha_numeric | acitve(url) | accepted |distinct | file | same | |
| * size | string | timezone | unique | url | nullable | not_in| digits | digits_between | mime_type | mime_type_by_file_extension | |
| * in_array | ip_address | image | regex:patten | | |
| * @return array | |
| */ | |
| public function rules() | |
| { | |
| return [ | |
| 'topic' => 'required', | |
| 'detail' => 'required', | |
| ]; | |
| } | |
| /** | |
| * If need to overiding message of node | |
| * @return array | |
| */ | |
| public function messages() | |
| { | |
| return []; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment