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


    public function authorize() {
        return true;
    }
}