Пример #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $model = $this->resource->find($id);
     Drawbridge::authorize('update', $model);
     $data = $this->resource->commonViewData();
     $data['action'] = route('caravel::' . $this->resource->name . '.update', $id);
     $data['model'] = $model;
     return view('caravel::pages.form', $data);
 }
Пример #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $model = $this->resource->find($id);
     Drawbridge::authorize('update', $model);
     $data = array_merge($this->resource->commonViewData(), ['action' => route('caravel::' . $this->resource->name . '.update', $model), 'model' => $model, 'bindable' => $this->resource->bindable($model)]);
     return view('caravel::pages.form', $data);
 }