model = $a_x_t-021; $this->model->setUserFilter(); parent::__construct(); } /** * Display a listing of the resource. * * @return Response */ public function index(AXT021UserRequest $request) { $a_x_t-021_s = $this->model->all(); $this->theme->prependTitle(trans('dsd::a_x_t-021.names').' :: '); return $this->theme->of('dsd::user.a_x_t-021.index', compact('a_x_t-021_s'))->render(); } /** * Display the specified resource. * * @param Request $request * @param int $id * * @return Response */ public function show(AXT021UserRequest $request, $role, $id) { $a_x_t-021 = $this->model->find($id); return $this->theme->of('dsd::user.a_x_t-021.show', compact('a_x_t-021'))->render(); } /** * Show the form for creating a new resource. * * @param Request $request * * @return Response */ public function create(AXT021UserRequest $request) { $a_x_t-021 = $this->model->findOrNew(0); Former::populate($a_x_t-021); return $this->theme->of('dsd::user.a_x_t-021.create', compact('a_x_t-021'))->render(); } /** * Display the specified resource. * * @param Request $request * * @return Response */ public function store(AXT021UserRequest $request) { try { $attributes = $request->all(); $a_x_t-021 = $this->model->create($attributes); return $this->success(trans('messages.success.created', ['Module' => trans('dsd::a_x_t-021.name')])); } catch (Exception $e) { return $this->error($e->getMessage()); } } /** * Show the form for editing the specified resource. * * @param Request $request * @param int $id * * @return Response */ public function edit(AXT021UserRequest $request, $role, $id) { $a_x_t-021 = $this->model->find($id); Former::populate($a_x_t-021); return $this->theme->of('dsd::user.a_x_t-021.edit', compact('a_x_t-021'))->render(); } /** * Update the specified resource. * * @param Request $request * @param int $id * * @return Response */ public function update(AXT021UserRequest $request, $role, $id) { try { $attributes = $request->all(); $a_x_t-021 = $this->model->update($attributes, $id); return $this->success(trans('messages.success.updated', ['Module' => trans('dsd::a_x_t-021.name')])); } catch (Exception $e) { return $this->error($e->getMessage()); } } /** * Remove the specified resource. * * @param int $id * * @return Response */ public function destroy(AXT021UserRequest $request, $role, $id) { try { $this->model->delete($id); return $this->success(trans('message.success.deleted', ['Module' => trans('dsd::a_x_t-021.name')]), 200); } catch (Exception $e) { return $this->error($e->getMessage()); } } }