Esempio n. 1
0
 /**
  * Return form view to create report
  *
  * @return Response
  */
 public function getCreateDistRealization()
 {
     $magazines = Magazine::all();
     $editions = Edition::with('magazine')->orderBy('magazine_id')->get();
     return view('report/form-dist-realization', ['magazines' => $magazines, 'editions' => $editions]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $magz = Magazine::all();
     $distPlan = DistPlan::with('edition.magazine')->find($id);
     return view('circulation/distribution-plan-form', ['distPlan' => $distPlan, 'distID' => $id, 'magList' => $magz, 'method' => 'PUT', 'form_action' => action('DistributionPlanController@update', $id)]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     try {
         $edition = Edition::with('magazine')->findOrFail($id);
     } catch (ModelNotFoundException $e) {
         $execMsg = "Cannot show magazine. Error on ID={$id}";
         return redirect('masterdata/edition/')->with('errMsg', $execMsg);
     }
     return view('masterdata/edition-form', ['edition' => $edition, 'magazines' => Magazine::all(), 'method' => 'PUT', 'edition_id' => $id, 'form_action' => action("EditionController@update", $id)]);
 }