Loading...
Loading...
Upgrade Laravel applications one major version at a time (9→10, 10→11, 11→12). Use when user wants to upgrade their Laravel framework version. Auto-detects current version from composer.json, identifies breaking changes, and applies necessary code fixes.
npx skill4agent add 1weiho/laravel-upgrade-skill laravel-upgradecomposer.jsonlaravel/framework// Example: "laravel/framework": "^10.0" means Laravel 10.x| Current | Target | Reference File |
|---|---|---|
| 9.x | 10.x | references/from-9-to-10.md |
| 10.x | 11.x | references/from-10-to-11.md |
| 11.x | 12.x | references/from-11-to-12.md |
composer.json$dates$casts(string)HasUuidsBus::dispatchNowRedirect::homecomposer.json# Update laravel/framework constraint to target version
# Update related packages per upgrade guide
composer updatephp artisancomposer.json// Before
protected $dates = ['deployed_at'];
// After
protected $casts = ['deployed_at' => 'datetime'];protected \$dates\s*=// Before
$string = (string) DB::raw('select 1');
// After
$string = DB::raw('select 1')->getValue(DB::connection()->getQueryGrammar());->change()// 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;