From 434adf473bfb9cee4ec13f2917cc5460adea465f Mon Sep 17 00:00:00 2001 From: Claudio Pinto Date: Mon, 3 Jul 2023 11:18:53 +0100 Subject: [PATCH] supporting any laravel version till 10 --- composer.json | 5 +++-- src/ViewComposers/ViewComposer.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 71000ed..e6b2783 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,9 @@ "keywords": ["laravel", "javascript", "language", "translations", "routes"], "type": "library", "require": { - "php": ">=7.1", - "illuminate/support": "^5.1" + "php": "^7.1||^8.2", + "ext-json": "*", + "laravel/laravel": "^6.20||^7.30||^8.83||^9.52||^10.14" }, "license": "MIT", "autoload": { diff --git a/src/ViewComposers/ViewComposer.php b/src/ViewComposers/ViewComposer.php index 53b2a2e..25310a8 100644 --- a/src/ViewComposers/ViewComposer.php +++ b/src/ViewComposers/ViewComposer.php @@ -38,7 +38,7 @@ public function compose(View $view) * @param string $prefix * @return array */ - private function transArray(array $array, $prefix) + private function transArray(array $array, string $prefix): array { $data = [];