<?php namespace App\Http\Requests;
 
use Illuminate\Foundation\Http\FormRequest;
 
class UserRequest extends FormRequest {
    public function rules() {
        return [
		    'nom' => 'required',
		    'prenom' => 'required',
		    'login' => 'required',
		    'mail' => 'email',
		    'password' => '',
		    'users_role',
        ];
    }
 
      public function attributes() {
        return [
            'nom' => 'Nom',
            'prenom' => 'Prénom',
            'login' => 'Identifiant',
            'mail' => 'Email',
            'password' => 'Mot de passe',
        ];
    }


    public function authorize() {
        return true;
    }
}