【Laravel】artisanのmake:castコマンドを解説

Laravel

Laravel 10.xのartisanの「make:cast」コマンドを解説します。

Description

新しいカスタムEloquentキャストクラスの作成

Usage

php artisan make:cast [-f|--force] [--inbound] [--] <name>

Arguments

引数必須説明
name必須キャスト名

Options

オプション省略形必須説明
forcef-キャストが既に存在する場合でもクラスを作成する
inbound--インバウンドキャストクラスを生成

Example

no options

php artisan make:cast Foo
   INFO  Cast [app/Casts/Foo.php] created successfully.  

Follow me!

コメント

PAGE TOP
タイトルとURLをコピーしました