mouzak
4 months ago

Missing argument 2 for App\Http\Controllers\PaieController::B_paie()

Posted 4 months ago by mouzak

Hi ! help me solve this error. thank you Route::get('/paie','[email protected]_paie')->name('paie'); controller

public function B_paie( Request $request, $id) { $data=array(); $data['sala'] = salaries::findOrFail($id); $data['sala']->relationPaie()->save(new Paie($attributes)); $data['sal'] = salaries::all(); $data['parametres'] = parametres::all();

 return view('bulletin_paie',compact("data"));

}

model class salaries extends Model{

public function relationPaie(){
    return $this->hasOne ('App\paie');
}

}

Please sign in or create an account to participate in this conversation.