ClearBowl/api/app/Http/Requests/AddProductRequest.php

38 lines
640 B
PHP
Raw Normal View History

2019-12-04 12:49:41 +01:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AddProductRequest extends FormRequest
{
/**
* 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()
{
return [
'name' => 'required',
];
}
public function messages()
{
return [
'name.required' => 'Product name is required',
];
}
}