This skill upgrades Laravel applications one major version at a time by detecting current version and applying targeted fixes and guidance.
npx playbooks add skill 1weiho/laravel-upgrade-skill --skill laravel-upgrade
Upgrade Laravel applications one major version at a time. Supports: 9→10, 10→11, 11→12.
Read composer.json and find the laravel/framework version constraint:
// Example: "laravel/framework": "^10.0" means Laravel 10.x
Determine target version (current + 1). If already on Laravel 12, inform user they're on the latest supported version.
Based on detected versions, read the appropriate reference file:
| Current | Target | Reference File |
|---------|--------|----------------|
| 9.x | 10.x | [references/from-9-to-10.md](references/from-9-to-10.md) |
| 10.x | 11.x | [references/from-10-to-11.md](references/from-10-to-11.md) |
| 11.x | 12.x | [references/from-11-to-12.md](references/from-11-to-12.md) |
For each breaking change in the guide, scan the codebase and apply fixes:
High Impact (always check):
composer.json dependency versionsMedium Impact (check relevant files):
$dates property → $casts (9→10)(string) casting (9→10)HasUuids trait behavior change (11→12)Low Impact (check if patterns found):
Bus::dispatchNow, Redirect::home, etc.)After code fixes, update composer.json:
# Update laravel/framework constraint to target version
# Update related packages per upgrade guide
composer update
php artisan to verify framework bootsSearch composer.json for outdated constraints and update per guide.
// Before
protected $dates = ['deployed_at'];
// After
protected $casts = ['deployed_at' => 'datetime'];
Search pattern: protected \$dates\s*=
// Before
$string = (string) DB::raw('select 1');
// After
$string = DB::raw('select 1')->getValue(DB::connection()->getQueryGrammar());
Migrations using ->change() must now include all modifiers:
// Before (implicit retention)
$table->integer('votes')->nullable()->change();
// After (explicit)
$table->integer('votes')->unsigned()->default(1)->nullable()->change();
// Before (ordered UUIDv4)
use Illuminate\Database\Eloquent\Concerns\HasUuids;
// After (if you need UUIDv4 behavior)
use Illuminate\Database\Eloquent\Concerns\HasVersion4Uuids as HasUuids;Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.