The Laravel Artisan Cheatsheet now has an API. Learn more.

make:cast

Create a new custom Eloquent cast class

Arguments

  • name - The name of the class Required
php artisan make:cast <name>