/** * Remove the specified Element from storage. * * @param int $id * * @return Response */ public function destroy($id) { $element = $this->elementRepository->find($id); if (empty($element)) { Flash::error('Element not found'); return redirect(route('elements.index')); } $this->elementRepository->delete($id); Flash::success('Element deleted successfully.'); return redirect(route('elements.index')); }
/** * undocumented function * * @return void * @author **/ public function createInside($id) { $container = $this->elementRepository->find($id); return view('files.create-here')->with('container', $container); }