/**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @param Request $request
  *
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Request $request)
 {
     $form = new Form(TypeRocketMedia::class, 'update', $id, '/media/' . $id);
     $form->setRequest($request);
     return view('typerocket::media.edit', ['form' => $form]);
 }
示例#2
0
 /**
  * Setup to use with a Form.
  *
  * @param Form $form
  *
  * @return $this
  */
 public function configureToForm(Form $form)
 {
     $this->setGroup($form->getGroup());
     $this->setSub($form->getSub());
     $this->itemId = $form->getItemId();
     $this->resource = $form->getResource();
     $this->setPopulate($form->getPopulate());
     $this->form = clone $form;
     return $this;
 }