Skip to content

Instantly share code, notes, and snippets.

@kirkbushell
Created March 12, 2015 17:17
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 kirkbushell/57bf3d1db31dd5b8ef72 to your computer and use it in GitHub Desktop.
Save kirkbushell/57bf3d1db31dd5b8ef72 to your computer and use it in GitHub Desktop.
<?php namespace Modules\User\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateUserRequest extends FormRequest
{
public function rules()
{
return [
'email' => "required|email|unique:users,email,{$this->user->id}",
'first_name' => 'required',
'last_name' => 'required',
];
}
public function authorize()
{
return true;
}
public function messages()
{
return [];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment