1. Go to this page and download the library: Download wamesk/laravel-commands library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wamesk / laravel-commands example snippets
// config/wame-commands.php
return [
/* Version of ApiController you want to develop (v1, v2, v3, null) */
// 'version' => 'v1', // Default: null
/* Typ of id your project is using (options: id (basic integer), uuid, ulid) */
// 'id-type' => 'uuid', // Default: ulid
/* Enable or disable sorting in migration and model */
// 'sorting' => false, // Default: true
/* Per page pagination default */
// 'per_page' => 10, // Default: 10
/* What language mutations should it generate. All will contain EN phrases. */
// 'langs' => ['en'], // Default: en
/* You can disable commands that wame:make will run. By default, all will run. */
'make' => [
// 'api-controllers' => false,
// 'events' => false,
// 'lang' => false,
// 'listeners' => false,
// 'migration' => false,
// 'model' => false,
// 'nova' => false,
// 'observer' => false,
// 'policy' => false,
],
];
// wame-commands.php
// Will add HasUuids or Ulids to model depending on id-type
'id-type' => 'ulid', // Other options: id, uuid
// Will add SortableTrait and Sortable interface to class along with $sortable array config
'sorting' => true, // Other option: false
// wame-commands.php
// Will add SortableTrait and Sortable interface to class along with $sortable array config
'sorting' => true, // Other option: false
// wame-commands.php
// Will add id column depending on id-type
'id-type' => 'ulid', // Other options: id, uuid
// Will add `$table->unsignedInteger('sort')->nullable();` column
'sorting' => true, // Other option: false
/* What language mutations should it generate. All will contain EN phrases. */
'langs' => ['en'], // Default: en