From dc32964e11a7d4c8b15150b1e086e9036f98d3aa Mon Sep 17 00:00:00 2001 From: Shavonn Brown Date: Mon, 30 Mar 2026 22:06:06 -0400 Subject: [PATCH] feat: add Laravel 13 support --- .github/workflows/tests.yml | 5 ++++- README.md | 7 ++++--- composer.json | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34b70b0..8c16dc6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,11 @@ jobs: fail-fast: true matrix: php: [ 8.2, 8.3, 8.4 ] - laravel: [ 11.*, 12.* ] + laravel: [ 11.*, 12.*, 13.* ] stability: [ prefer-lowest, prefer-stable ] + exclude: + - php: 8.2 + laravel: 13.* name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} diff --git a/README.md b/README.md index c8e8ba2..e894754 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ records, with no user resolution or driver complexity. ## Requirements - PHP 8.2+ -- Laravel 11 or 12 +- Laravel 11 or 12 or 13 ## Installation @@ -188,7 +188,8 @@ The model automatically clears the cache when toggles are saved or deleted. ### Inertia -Share all toggles with your frontend by using the provided Inertia middleware. Replace your `HandleInertiaRequests` middleware in `bootstrap/app.php`: +Share all toggles with your frontend by using the provided Inertia middleware. Replace your `HandleInertiaRequests` +middleware in `bootstrap/app.php`: ```php use OffloadProject\Toggle\Middleware\ShareTogglesWithInertia; @@ -204,7 +205,7 @@ All toggles will be available as the `flags` prop in your frontend: ```js // Vue/React -const { flags } = usePage().props +const {flags} = usePage().props if (flags.newCheckout) { // Show new checkout diff --git a/composer.json b/composer.json index 2e02dbe..c5a13ef 100644 --- a/composer.json +++ b/composer.json @@ -17,16 +17,16 @@ ], "require": { "php": "^8.2", - "illuminate/contracts": "^11.0|^12.0", - "illuminate/database": "^11.0|^12.0", - "illuminate/support": "^11.0|^12.0" + "illuminate/contracts": "^11.0|^12.0|^13.0", + "illuminate/database": "^11.0|^12.0|^13.0", + "illuminate/support": "^11.0|^12.0|^13.0" }, "require-dev": { "captainhook/captainhook-phar": "^5.27", "inertiajs/inertia-laravel": "^2.0", "larastan/larastan": "^3.8.1", "laravel/pint": "^1.26.0", - "orchestra/testbench": "^9.0|^10.8.0", + "orchestra/testbench": "^9.0|^10.8|^11.0", "pestphp/pest": "^3.0|^4.0", "pestphp/pest-plugin-laravel": "^3.0|^4.0", "ramsey/conventional-commits": "^1.6"