/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $coatch = Coatch::findOrFail($id); $licences = CoatchLicence::get(); if (empty($licences)) { return redirect()->route('coatch_licences.index')->with('message', 'Najpierw dodaj licencje.'); } return view('coatches.edit', compact('coatch'))->with('licences', $licences); }