Created by PhpStorm.
User: yan Date: 2018/8/17 0017 Time: 22:04
UpdateInfoRequest |
<?php
/**
* Created by PhpStorm.
* User: yan
* Date: 2018/8/17 0017
* Time: 22:04
*/
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class UpdateInfoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required',
'email' => 'required|email',
'o_password'=>'required',
'n_password' => 'nullable|min:6',
'c_password' => 'same:n_password',
];
}
}