##make:data
You can easily generate new data objects with the artisan command make:data
:
php artisan make:data PostData
By default, this command puts data objects in the App\Data
namespace, this can be changed as such:
php artisan make:data PostData --namespace=DataTransferObjects
By default, the command creates a new data object within the \App\Data
namespace and suffixes the class with Data
, this can be changed by adding the following lines to the data.php
config file:
'commands' => [
'make' => [
'namespace' => 'Data',
'suffix' => 'Data',
],
]