Exemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param \TypiCMS\Modules\Files\Shells\Models\File               $file
  * @param \TypiCMS\Modules\Files\Shells\Http\Requests\FormRequest $request
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function update(File $file, FormRequest $request)
 {
     $error = $this->repository->update($request->all()) ? false : true;
     return response()->json(['error' => $error], 200);
 }
Exemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param \TypiCMS\Modules\Files\Shells\Models\File               $file
  * @param \TypiCMS\Modules\Files\Shells\Http\Requests\FormRequest $request
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function update(File $file, FormRequest $request)
 {
     $this->repository->update($request->all());
     return $this->redirect($request, $file);
 }