Skip to content

Commit

Permalink
#2029: Use str_after_last
Browse files Browse the repository at this point in the history
  • Loading branch information
haringsrob committed Jan 3, 2023
1 parent ec3dac2 commit 373dc2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Http/Controllers/Admin/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public function show($id, $submoduleId = null)
*/
public function edit($id, $submoduleId = null)
{
$parameter = Str::singular(Str::afterLast($this->moduleName, '.'));
$parameter = Str::singular(str_after_last($this->moduleName, '.'));
$id = $this->request->route()->parameter($parameter, $id);
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

Expand Down Expand Up @@ -529,7 +529,7 @@ public function create($parentModuleId = null)
*/
public function update($id, $submoduleId = null)
{
$parameter = Str::singular(Str::afterLast($this->moduleName, '.'));
$parameter = Str::singular(str_after_last($this->moduleName, '.'));
$id = $this->request->route()->parameter($parameter, $id);
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

Expand Down Expand Up @@ -727,7 +727,7 @@ public function bulkPublish()
*/
public function duplicate($id, $submoduleId = null)
{
$parameter = Str::singular(Str::afterLast($this->moduleName, '.'));
$parameter = Str::singular(str_after_last($this->moduleName, '.'));
$id = $this->request->route()->parameter($parameter, $id);
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

Expand Down Expand Up @@ -757,7 +757,7 @@ public function duplicate($id, $submoduleId = null)
*/
public function destroy($id, $submoduleId = null)
{
$parameter = Str::singular(Str::afterLast($this->moduleName, '.'));
$parameter = Str::singular(str_after_last($this->moduleName, '.'));
$id = $this->request->route()->parameter($parameter, $id);
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

Expand Down

0 comments on commit 373dc2d

Please sign in to comment.