firefly-iii/app/Http/Requests/ProfileFormRequest.php
2016-02-05 12:08:25 +01:00

37 lines
635 B
PHP

<?php
declare(strict_types = 1);
namespace FireflyIII\Http\Requests;
use Auth;
/**
* Class ProfileFormRequest
*
*
* @package FireflyIII\Http\Requests
*/
class ProfileFormRequest extends Request
{
/**
* @return bool
*/
public function authorize()
{
// Only allow logged in users
return Auth::check();
}
/**
* @return array
*/
public function rules()
{
return [
'current_password' => 'required',
'new_password' => 'required|confirmed',
'new_password_confirmation' => 'required',
];
}
}