<?php namespace App\Http\Requests;
 
use Illuminate\Foundation\Http\FormRequest;
 
class ClasseRequest extends FormRequest {
    public function rules() {
        return [
            'nom' => 'required|max:100',
            'nom_court' => 'required|max:20',
            'id_filiere' => 'required',
            'id_niveau' => 'required',
            'id_pp' => '',
            'id_filiere' => 'required',
            'id_diplome' => 'required',
        ];
    }
 

     public function attributes() {
        return [
            'nom' => 'Nom de la classe',
            'nom_court' => 'Nom abrégé de la classe',
            'id_filiere' => 'Filière',
            'id_niveau' => 'Niveau',
            'id_pp' => 'Professeur Principal',
            'id_niveau' => 'Niveau',
            'id_filiere' => 'Filière',
            'id_diplome' => 'Diplôme',
        ];
    }


    public function authorize() {
        return true;
    }
}