| @@ 125-140 (lines=16) @@ | ||
| 122 | ->with('route', $this->route); |
|
| 123 | } |
|
| 124 | ||
| 125 | public function show($id) |
|
| 126 | { |
|
| 127 | if (!$this->entityInstance) { |
|
| 128 | $this->entityInstance = $this->entity->findOrFail($id); |
|
| 129 | } |
|
| 130 | ||
| 131 | $this->prepareFields(); |
|
| 132 | ||
| 133 | return view('crud::show') |
|
| 134 | ->with('type', 'show') |
|
| 135 | ->with('route', $this->route) |
|
| 136 | ->with('t', $this->texts) |
|
| 137 | ->with('fields', $this->fields) |
|
| 138 | ->with('formColsClasses', $this->formColsClasses) |
|
| 139 | ->with('data', $this->entityInstance); |
|
| 140 | } |
|
| 141 | ||
| 142 | public function create() |
|
| 143 | { |
|
| @@ 205-221 (lines=17) @@ | ||
| 202 | : trans('eliurkis::crud.save_action')); |
|
| 203 | } |
|
| 204 | ||
| 205 | public function edit($id) |
|
| 206 | { |
|
| 207 | if (!$this->entityInstance) { |
|
| 208 | $this->entityInstance = $this->entity->findOrFail($id); |
|
| 209 | } |
|
| 210 | ||
| 211 | $this->prepareFields(); |
|
| 212 | ||
| 213 | return view('crud::create') |
|
| 214 | ->with('type', 'edit') |
|
| 215 | ->with('route', $this->route) |
|
| 216 | ->with('t', $this->texts) |
|
| 217 | ->with('fields', $this->fields) |
|
| 218 | ->with('formColsClasses', $this->formColsClasses) |
|
| 219 | ->with('links', $this->prepareLinks()) |
|
| 220 | ->with('data', $this->entityInstance); |
|
| 221 | } |
|
| 222 | ||
| 223 | public function update(Request $request, $id) |
|
| 224 | { |
|