Skip to content

Instantly share code, notes, and snippets.

@ferdiunal
Created April 15, 2016 20:37
Show Gist options
  • Select an option

  • Save ferdiunal/fe896bdd680349948faef9852fd87332 to your computer and use it in GitHub Desktop.

Select an option

Save ferdiunal/fe896bdd680349948faef9852fd87332 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class Post extends Request
{
/**
* 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.
* Burada örnek amaçlı girdim. sizler istediğinizi yapmakta özgürsünüz.
* @return array
*/
public function rules()
{
return [
'post.*' => 'required',
];
}
public function messages()
{
return [
'post.*.required' => 'Bu alan boş bırakılmaz !',
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment