Skip to content

Instantly share code, notes, and snippets.

@maxca
Created May 31, 2018 00:44
Show Gist options
  • Save maxca/8ff7fcf9e2ffd9d701b5bc37f670fc32 to your computer and use it in GitHub Desktop.
Save maxca/8ff7fcf9e2ffd9d701b5bc37f670fc32 to your computer and use it in GitHub Desktop.
<?php
/**
* @author samark chaisanguan
* @email [email protected]
*/
namespace App\Http\Requests\Good;
use Lumpineevill\Request\APIRequest;
class GetGoodRequest 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 [
# 'id' => 'required|exists:good,id',
# 'email' => 'unique:good,email',
];
}
/**
* 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