<?php namespace App\Http\Requests;
 
use Illuminate\Foundation\Http\FormRequest;
 
class MedRequest extends FormRequest {
    public function rules() {
        return [
            'sonum' => 'required',
            'numero' => '',
            'date_envoi' => 'required',
            'motif' => 'required', 
            'nbmois' => 'required',
            'cotisations' => 'required',
            'majorations' => 'required',
            'periode_deb' => 'required',
            'periode_fin' => 'required',
            'obs' => '',
        ];
    }
 

    public function attributes() {
        return [
            'sonum' => 'Employeur',
            'numero' => 'Numéro',
            'date_envoi' => "Date d'envoi",
            'motif' => 'Motif', 
            'nbmois' => 'required',
            'cotisations' => 'Cotisations',
            'majorations' => 'Majorations',
            'periode_deb' => 'Période de début',
            'periode_fin' => 'Période de fin',
            'obs' => '',
        ];
    }


    public function authorize() {
        return true;
    }
}












