diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6af70e39..8576de89c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,13 +14,19 @@ jobs: matrix: os: [ubuntu-latest] php: [8.1, 8.0, 7.4, 7.3] - laravel: [9.*, 8.*] + laravel: [9.*, 8.*, 7.*, 6.*, 5.8.*] dbal: [^2.12, ^3.0] include: - laravel: 9.* testbench: 7.* - laravel: 8.* testbench: 6.* + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + - laravel: 5.8.* + testbench: 3.8.* exclude: - laravel: 9.* php: 7.4 @@ -28,6 +34,24 @@ jobs: php: 7.3 - laravel: 8.* php: 8.1 + - laravel: 7.* + php: 8.1 + - laravel: 7.* + php: 8.0 + - laravel: 6.* + php: 8.1 + - laravel: 6.* + php: 8.0 + - laravel: 5.8.* + php: 8.1 + - laravel: 5.8.* + php: 8.0 + - dbal: ^3.0 + laravel: 5.8.* + - dbal: ^3.0 + laravel: 6.* + - dbal: ^3.0 + laravel: 7.* - dbal: ^2.12 laravel: 8.* - dbal: ^2.12 diff --git a/composer.json b/composer.json index 0b474a3d3..03f4a6e42 100644 --- a/composer.json +++ b/composer.json @@ -27,27 +27,27 @@ "ext-json": "*", "ext-pdo": "*", "astrotomic/laravel-translatable": "^11.5", - "cartalyst/tags": "^11.0|^12.0", + "cartalyst/tags": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "doctrine/dbal": "^2.12|^3.0", "guzzlehttp/guzzle": "^6.2|^7.0", "imgix/imgix-php": "^3.0", - "laravel/framework": "^8.0|^9.0", - "laravel/socialite": "^5.0", - "laravel/ui": "^3.0|^4.0", + "laravel/framework": "~5.6|~5.7|~5.8|^6.0|^7.0|^8.0|^9.0", + "laravel/socialite": "^4.2|^5.0", + "laravel/ui": "^1.0|^2.0|^3.0|^4.0", "league/flysystem-aws-s3-v3": "^1.0|^2.0|^3.0", "league/glide-laravel": "^1.0", "matthewbdaly/laravel-azure-storage": "^1.3|^2.0", "myclabs/php-enum": "^1.5", "pragmarx/google2fa-qrcode": "^1.0|^2.0", - "spatie/laravel-activitylog": "^3.0|^4.0", - "spatie/laravel-analytics": "^3.0|^4.0", + "spatie/laravel-activitylog": "^2.5|^3.2|^4.0", + "spatie/laravel-analytics": "^3.6|^4.0", "spatie/once": "^2.0|^3.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16|^3.0", "kalnoy/nestedset": "^5.0|^6.0", - "nunomaduro/collision": "^5.0|^6.0", - "orchestra/testbench": "^6.0|^7.0", + "nunomaduro/collision": "^3.0|^4.2|^5.0|^6.0", + "orchestra/testbench": "~3.3|~3.4|~3.5|~3.6|~3.7|~3.8|^4.0|^5.0|^6.0|^7.0", "phpunit/phpunit": "~5.0|~6.0|~7.0|~8.0|~9.0", "chillerlan/php-qrcode": "~2.0|~3.0|~4.0" }, diff --git a/src/Http/Controllers/Admin/ModuleController.php b/src/Http/Controllers/Admin/ModuleController.php index 903861e7b..df2c79278 100644 --- a/src/Http/Controllers/Admin/ModuleController.php +++ b/src/Http/Controllers/Admin/ModuleController.php @@ -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); @@ -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); @@ -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); @@ -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);