The Laravel team released 8.4, 8.5, and 8.6 over the last week with plenty of new features including SQLite schema dump support, auto-handling castAsJson values that are “Jsonable,” an artisan command for clearing queues, along with the latest new features, fixes, and changes in the 8.x branch.

SQLite Schema Dump Support

Paras Malhotra contributed SQLite support for the new schema:dump artisan command. Laravel 8 introduced this feature to squash large migrations into a single SQL file as an application’s migration files grow.

Auto-Handling castAsJson()

Andrew Brown contributed a castAsJson() method to the base test case, which now supports auto-casting of Jsonable and array values:

$this->assertDatabaseHas('users', [
    'name' => $user->name,
    'email' => $user->email,
    'nicknames' => $this->castAsJson($user->nicknames->toJson()),
];

Clearing Queues with Artisan

Paras Malhotra contributed an artisan queue:clear command you can use in development (and perhaps in some emergency production issues) to clear your application’s queue:

## Delete all jobs from the default queue
php artisan queue:clear

## Clear jobs on the redis connection and the "emails" queue
php artisan queue:clear redis --queue=emails

#laravel #php #web-development #programming #developer

Laravel 8.6 Released
2.95 GEEK