Skip to content

Instantly share code, notes, and snippets.

@daanfl
Created April 19, 2019 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daanfl/4a9f8bdfa281e98121b27b05d07e1c3f to your computer and use it in GitHub Desktop.
Save daanfl/4a9f8bdfa281e98121b27b05d07e1c3f to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SaveProductRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'title' => 'required|string|max:50',
'price' => 'required|numeric',
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment