{"id":13723061,"url":"https://github.com/mikeerickson/laravel-craftsman","last_synced_at":"2025-04-07T13:09:28.926Z","repository":{"id":56427085,"uuid":"176574987","full_name":"mikeerickson/laravel-craftsman","owner":"mikeerickson","description":"Laravel Craftsman CLI for easily crafting Laravel assets for any project (artisan make on steroids)","archived":false,"fork":false,"pushed_at":"2020-12-09T00:28:23.000Z","size":50869,"stargazers_count":232,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T22:44:20.197Z","etag":null,"topics":["artisan","craft","craftsman","generator","hacktoberfest","hacktoberfest2020","laravel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeerickson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-19T18:29:31.000Z","updated_at":"2025-03-28T10:21:07.000Z","dependencies_parsed_at":"2022-08-15T18:31:03.233Z","dependency_job_id":null,"html_url":"https://github.com/mikeerickson/laravel-craftsman","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeerickson%2Flaravel-craftsman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeerickson%2Flaravel-craftsman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeerickson%2Flaravel-craftsman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeerickson%2Flaravel-craftsman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeerickson","download_url":"https://codeload.github.com/mikeerickson/laravel-craftsman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","craft","craftsman","generator","hacktoberfest","hacktoberfest2020","laravel"],"created_at":"2024-08-03T01:01:35.904Z","updated_at":"2025-04-07T13:09:28.908Z","avatar_url":"https://github.com/mikeerickson.png","language":"PHP","funding_links":[],"categories":["Projects using Laravel Zero","PHP"],"sub_categories":[],"readme":"# Laravel Craftsman\n\n## Description\n\nLaravel Craftsman (written using the awesome [Laravel-Zero](https://www.laravel-zero.com) CLI builder) provides a suite of crafting assets using a project agnostic CLI.\n\nYou can quickly create `class`, `command`, `controller`, `event`, `factory`, `form-request`, `listener`, `migration`, `model`, `resource`, `rule`, `seed`, `test` and `view` assets.\n\nIn addition, you can create all assets with a single command, allowing you to quickly craft a new resource in seconds!\n\n📝 [Laravel News Article](https://laravel-news.com/laravel-craftsman-cli)\n\n📦 [Packagist](https://packagist.org/packages/codedungeon/laravel-craftsman)\n\n\u003ch1 align=\"center\"\u003e\n    \u003cimg src=\"docs/images/laravel-craftsman.png\" alt=\"Laravel Craftsman\"\u003e\n\u003c/h1\u003e\n\n## Table Of Conents\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n-   [Commands](#commands)\n-   [Tips](#tips)\n-   [Custom Templates](#custom-templates)\n-   [License](#license)\n-   [Credits](#credits)\n\n## Installation\n\n### Using Composer\n\n```bash\n\u003e composer global require codedungeon/laravel-craftsman\n```\n\n### Using curl/wget\n\n```bash\n\u003e curl -o laravel-craftsman https://github.com/mikeerickson/laravel-craftsman/archive/master.zip\n\nor\n\n\u003e wget https://github.com/mikeerickson/laravel-craftsman/archive/master.zip\n```\n\n## Usage\n\n```bash\n\u003e laravel-craftsman \u003ccommand\u003e [options] [arguments]\n\n\u003e laravel-craftsman interactive\n\u003e laravel-craftsman interactive --silent\n\n\u003e laravel-craftsman publish\n\u003e laravel-craftsman publish --overwrite\n\n\u003e laravel-craftsman craft:all Post --model App/Models/Post --tablename posts --rows 50 --extends layouts.app --section content\n\n\u003e laravel-craftsman craft:api --model App/TestClass --overwrite\n\n\u003e laravel-craftsman craft:class App/TestClass --constructor\n\n\u003e laravel-craftsman craft:controller PostController --model App/Models/Post\n\n\u003e laravel-craftsman craft:event ContactCreated\n\u003e laravel-craftsman craft:event ContactCreated --no-broadcast\n\n\u003e laravel-craftsman craft:factory PostFactory --model App/Models/Post\n\n\u003e laravel-craftsman craft:migration create_posts_table --table posts\n\n\u003e laravel-craftsman craft:model App/Models/Post --table posts\n\u003e laravel-craftsman craft:model App/Models/Post --table posts --migration\n\n\u003e laravel-craftsman craft:request CustomerRequest --rules \"title?required|unique|posts,body?required\"\n\n\u003e laravel-craftsman craft:rule Uppercase\n\n\u003e laravel-craftsman craft:seed PostTableSeeder --model App/Models/Post --rows 100\n\n\u003e laravel-craftsman craft:views authors --extends partials.master --section content\n\n```\n\n## Commands\n\nThe following commands are available in any Laravel project. You can use the individual crafting routines which are similar to the Artisan commands, but the `craft:all` command is the most powerful of the bunch.\n\nUsing `craft:all` you can easily generate all assets (controller, factory, migration, model, and seed) for a given resource (ie Post, Customer, etc)\n\n```bash\nlaravel-craftsman craft:all Contact \\\n  --model App/Models/Contact \\\n  --tablename contacts \\\n  --rows 50 \\\n  --fields \"first_name:string@30:nullable,last_name:string@50:nullable,email:string@80:nullable:unique\"\n```\n\n🚩Required Parameter / Option\n\n| Command              | Name / Option         | Description                                                                         |\n| -------------------- | --------------------- | ----------------------------------------------------------------------------------- |\n| **interactive**      |                       | **Run Interactive Mode (uses wizard to craft resources**                            |\n|                      | --silent, -s          | Skips Wizard Instructions                                                           |\n| **publish**          |                       | **Publish templates to project diretory**                                           |\n|                      |                       | _==\u003e all craft:xxx commands will use project template if it exists_                 |\n|                      | --skip-config, -c     | Skip publishing craftsman configuration file                                        |\n|                      | --overwrite, -o       | Overwrites published templates directory                                            |\n| **craft:api**        |                       | **Craft API Resources (create model, controller, factory, migration, seed)**        |\n|                      | **🚩 base name**       | Based resource name for all assets (example Contact)                                |\n|                      | **🚩 --model, -m**     | Path to model (eg App/Models/Post)                                                  |\n|                      | --table, -t           | Tablename used in database (will set \\$tablename in Model)                          |\n|                      |                       | _If not supplied, default table will be pluralized model name_                      |\n|                      | --rows, -r            | Number of rows used by seed when using Factory                                      |\n|                      | --current, -u         | Use --useCurrent for timestamps when creating migration                             |\n|                      | --no-model, -o        | Do not create model                                                                 |\n|                      | --no-controller, -c   | Do not create controller                                                            |\n|                      | --no-factory, -f      | Do not create factory                                                               |\n|                      | --no-migration, -g    | Do not create migration                                                             |\n|                      | --no-seed, -s         | Do not create seed                                                                  |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:all**        |                       | **Creates all assets (Controller, Factory, Migration, Model, Seed)**                |\n|                      | **🚩 base name**       | Based resource name for all assets                                                  |\n|                      | **🚩 --model, -m**     | Path to model (eg App/Models/Post)                                                  |\n|                      | --tablename, -t       | Tablename used in database (will set \\$tablename in Model)                          |\n|                      |                       | _If not supplied, default table will be pluralized model name_                      |\n|                      | --rows, -r            | Number of rows used by seed when using Factory                                      |\n|                      | --extends, -x         | View extends block (optional)                                                       |\n|                      | --section, -i         | View section block (optional)                                                       |\n|                      | --no-controller, -c   | Do not create controller                                                            |\n|                      | --no-factory, -a      | Do not create factory                                                               |\n|                      | --no-migration, -g    | Do not create migration                                                             |\n|                      | --no-model, -o        | Do not create model                                                                 |\n|                      | --no-seed, -s         | Do not create seed                                                                  |\n|                      | --no-views, -e        | Do not create seed                                                                  |\n| **craft:class**      |                       | **Creates empty class**                                                             |\n|                      | **🚩 class name**      | Class path (eg App/Services/MyService)                                              |\n|                      | --constructor, -c     | Include constructor method                                                          |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:command**    |                       | **Creates Artisan Command class**                                                   |\n|                      | **🚩 command name**    | Command name                                                                        |\n|                      | --signature, -s       | Command Signature                                                                   |\n|                      | --description, -d     | Command Description                                                                 |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:controller** |                       | **Create controller using supplied options**                                        |\n|                      | **🚩 controller name** | Controller Name                                                                     |\n|                      | --model, -m           | Path to model (eg App/Models/Post)                                                  |\n|                      | --validation, -l      | Create validation blocks where appropriate                                          |\n|                      | --api, -a             | Create API controller (skips create and update methods)                             |\n|                      | --binding, -b         | Include route / model binding (requires model property)                             |\n|                      | --empty, -e           | Create empty controller                                                             |\n|                      | --resource, -r        | Create resource controller                                                          |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:event**      |                       | **Creates event class**                                                             |\n|                      | **🚩 event name**      | Event Name                                                                          |\n|                      | --listener, -l        | Generate Listener                                                                   |\n|                      | --no-broadcast, -b    | Skips broadcast code when event class created                                       |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:factory**    |                       | **Creates factory using supplied options**                                          |\n|                      | **🚩 factory name**    | Factory Name                                                                        |\n|                      | --model, -m           | Path to model (eg App/Models/Post)                                                  |\n| **craft:listener**   |                       | **Creates listener class**                                                          |\n|                      | **🚩 listener name**   | Listener Name                                                                       |\n|                      | --event, -e           | The event class be listener for                                                     |\n|                      | --queued              | Indicates the event listener should be queued                                       |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:migration**  |                       | **Creates migration using supplied options**                                        |\n|                      | **🚩 migration name**  | Migration Name (eg create\\*contacts_table)                                          |\n|                      | **--model, -m**       | Path to model (required)                                                            |\n|                      | --table, -t           | Tablename used in database (will set \\$tablename in Model)                          |\n|                      |                       | \\_If not supplied, default table will be pluralized model name\\*                    |\n|                      | --fields, -f          | List of fields (option) _see syntax below_                                          |\n|                      |                       | **🚨 If you have spaces separating fields, you must surround fields list in quotes** |\n|                      | --foreign, -r         | Add foreign key constraint (foreign info) _see syntax below_                        |\n|                      | --current, -u         | Use --useCurrent for timestamps (skipped by default)                                |\n|                      | --down, -d            | Include down methods (skipped by default)                                           |\n|                      | --template, -t        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:model**      |                       | **Creates model using supplied options**                                            |\n|                      | **🚩 model name**      | Model Name (eg Contact or App/Models/Contact)                                       |\n|                      |                       | _See below about defining alternate model path_                                     |\n|                      | --all, -a             | Generate a migration, factory, and controller for the model                         |\n|                      | --table, -t           | Tablename used in database (will set \\$tablename in Model)                          |\n|                      |                       | _If not supplied, default table will be pluralized model name_                      |\n|                      | --template, -m        | Path to custom template (override config file)                                      |\n|                      | --controller, -c      | Create a new controller                                                             |\n|                      | --factory, -f         | Create factory                                                                      |\n|                      | --migration, -m       | Create a new migration file file                                                    |\n|                      | --seed, -s            | Create a new seed file file                                                         |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n| **craft:request**    |                       | **Creates form request using supplied options**                                     |\n|                      | **🚩 request name**    | Request Name                                                                        |\n|                      |                       | _See below about defining alternate model path_                                     |\n|                      | --rules, -r           | List of rules (optional)                                                            |\n|                      |                       | **🚨 If you have spaces separating fields, you must surround rules lists in quotes** |\n|                      | --template, -m        | Path to custom template (override config file)                                      |\n|                      | --overwrite, -w       | Overwrite existing class                                                            |\n\n| **craft:rule**       |                        | **Creates validation rule**                                                          |\n|                      | **🚩 Rule Name**       | Rule Name (eg Uppercase)                                                             |\n|                      | --template, -t         | Path to custom template (override config file)                                       |\n|                      | --overwrite, -w        | Overwrite existing class                                                             |\n| **craft:seed**       |                        | **Creates seed file using supplied options**                                         |\n|                      | **🚩 Seed Name**       | Seed Name (eg ContactTableSeeder)                                                    |\n|                      | **🚩 --model, -m**     | Path to model (eg App/Models/Post)                                                   |\n|                      | --factory, -f          | Create Factory (if it does not already exists)                                       |\n|                      | --rows, -r             | Number of rows to use in factory call (Optional)                                     |\n|                      | --template, -t         | Path to custom template (override config file)                                       |\n|                      | --overwrite, -w        | Overwrite existing class                                                             |\n| **craft:test**       |                        | **Creates seed file using supplied options**                                         |\n|                      | **🚩 Test Name**       | Test Name (eg CreateFileTest)                                                        |\n|                      | --setup, -s            | Include setUp method                                                                 |\n|                      | --teardown, -d         | Include tearDown method                                                              |\n|                      | --unit, -u             | Create unit test (default will be Feature test)                                      |\n|                      | --pest, -p             | Create Pest test                                                                     |\n|                      | --template, -t         | Path to custom template (override config file)                                       |\n|                      | --overwrite, -w        | Overwrite existing class                                                             |\n| **craft:views**      | **🚩 base resource**   | **Seed name**                                                                        |\n|                      | --setup, -s            | Include setup block                                                                  |\n|                      | --teardown, -d         | Include tearDown block                                                               |\n|                      | --unit, -u             | Create unit test                                                                     |\n|                      | --template, -t         | Path to custom template (override config file)                                       |\n|                      | --overwrite, -w        | Overwrite existing class                                                             |\n| **craft:views**      | **🚩 base resource**   | **Creates view files**                                                               |\n|                      | --extends, -x          | Includes extends block using supplied layout                                         |\n|                      | --section, -s          | Includes section block using supplied name                                           |\n|                      | --no-create, -c        | Exclude create view                                                                  |\n|                      | --no-edit, -d          | Exclude edit view                                                                    |\n|                      | --no-index, -i         | Exclude index view                                                                   |\n|                      | --no-show, -w          | Exclude show view                                                                    |\n\n### Defining Class Path\n\nWhen crafting resources which are not automatically created in their assigned directories, you can define the location to the path where asset is created as follows:\n\n```bash\n\u003e laravel-craftsman craft:class App/Services/Sync ...\n```\n\nThis will create a class in the `App/Services` path, with filename `Sync.php`. Directories (including nested directories) will be created if they do not already exists.\n\n#### Supported Commands\n\nThe following commands support defining class path\n\n-   craft:class\n-   craft:event\n-   craft:factory\n-   craft:listener\n-   craft:model\n-   craft:seed\n-   craft:test\n-   craft:views\n\n### 📝 Template Access\n\nLaravel Craftsman will use sensible default templates which are located in the `laravel-craftsman` installation location. If you wish to have greater control over templates, you can publish (see `laravel-craftsman publish` command) default templates into the project directory (`\u003cproject\u003e/templates`).\n\nSubsequent `laravel-craftsman craft:xxx` commands will first look in the project templates directory, if template not found, then it will use the application templates.\n\n#### Single Use Templates\n\nIn addition to the standard templates, you may also define a single use template which is only used during command execution. Single use templates are designed to reference project specific templates, and you use the `\u003cprojet\u003e` keyword when executing the desire command.\n\n```bash\n\u003e laravel-craftsman craft:class App/Services/SyncService --template \"\u003cproject\u003e/templates/service.mustache\" ...\n```\n\n### oh-my-zsh Conflict\n\nIf you have `oh-my-zsh` installed, make sure you wrap template value in quotes, otherwise you may receive an error\n\n```bash\nlaravel-craftsman craft:class TestService --template \u003cproject\u003e/templates/custom.mustache --overwrite\nzsh: no such file or directory: project\n```\n\n### Foreign Key Syntax\n\nWhen using the `--foreign` option when building migrations, you should use the following syntax:\n\n```bash\nformat:\nforeignKey:primaryId,primaryTable\n\nexample:\n--foreign=post_id:id,posts\n-r=post_id:id,posts\n```\n\nAlternatively, you can supply just the foreign key part (using table_key format) and it will be used to extract the primary table and key.\nThe primary table will be a plural version of the first part, followed by the primary key id.\n\n```bash\n--foreign=post_id\n```\n\nwill be translated internally to use the full `--foreign` format\n\n```bash\n--foreign=post_id:id,posts\n```\n\n#### Automatic foreign key field creation\n\nWhen using the `--foreign` flag, the appropriate field will be added automatically in migration file.\nFor example, if the `--foreign post_id` flag is supplied, the following will be added to new migration\n\n```php\n    ...\n    Schema::create('comments', function (Blueprint $table) {\n        $table-\u003ebigIncrements('id');\n        $table-\u003eunsignedBigInteger('post_id');\n        ...\n        $table-\u003eforeign('post_id')-\u003ereferences('id')-\u003eon('posts');\n    });\n    ...\n```\n\n### Field Option Syntax\n\nWhen using the `--fields` option when building migrations, you should use the following syntax:\nNote: If you have used teh `--foreign` flag as outlined above, the foreign key field will be added automatically\n\n```bash\nformat:\nfieldName:fieldType@fieldSize:option1:option2:option3\n\nexample:\nemail:string@80:nullable:unique\n\n--fields \"fname:string@25:nullable,lname:string@50:nullable,email:string@80:nullable:unique,dob:datetime,notes:text,deleted_at:timezone\"\n\n    Schema::create('contacts', function (Blueprint $table) {\n        $table-\u003ebigIncrements('id');\n        $table-\u003etimestamps();\n        $table-\u003estring('fname', 25)-\u003enullable();\n        $table-\u003estring('lname', 50)-\u003enullable();\n        $table-\u003estring('email', 80)-\u003enullable()-\u003eunique();\n        $table-\u003edatetime('dob');\n        $table-\u003etext('notes');\n        $table-\u003etimezone('deleted_at');\n    });\n```\n\n### Rules Option Syntax\n\nWhen using the `--rules` option when building form requests, you should use the following syntax:\n\n```bash\nformat:\nruleName?rule1|rule2|rule3,ruleName2?rule1|rule2\n```\n\n```bash\n\u003e laravel-craftsman craft:request CustomerRequest --rules \"title?required|unique|posts,body?required\"\n```\n\nProduces the following\n\n```php\npublic function rules()\n{\n    return [\n        \"title\" =\u003e \"required|unique|posts\",\n        \"body\" =\u003e \"required\",\n    ];\n}\n```\n\n## Tips\n\n💡 **Boolean Option Shortcut**\n\nWhen executing any of the `laravel-craftsman` commands, if you wish to apply one or more switches (those options which do not require a corresponding value), you can use the standard CLI shorthands (this tip can be used in any CLI based tool, not just `laravel-craftsman` (well assuming the CLI actually supports shorthand).\n\nFor example:\n\nLets assume you wish to wish to create `views`, you can use the following command to skip creation of the create (-c), edit (-d) and show (-w) views (only creating the index view). The combination of `-cdw` is shorthand for `--no-create --no-edit --no-show`\n\n```bash\n\u003e laravel-craftsman craft:views --extends layouts.app --section content -cdw\n```\n\nis same as\n\n```bash\n\u003e laravel-craftsman craft:views --extends layouts.app --section content --no-create --no-edit --no-show\n\n\u003e laravel-craftsman craft:views --extends layouts.app --section content -c -d -w\n```\n\n💡 **Defining Nested Paths**\n\nAny command can store assets within tested folders within default path by separating `name` argument with forward slash\nFor example, the following command will define the path for model asset in the `App/Models/\u003cname\u003e` path\n\n```bash\n\u003e laravel-craftsman App/Models/Customer ...\n```\n\n## Custom Templates\n\nLaravel Craftsman provides support for creating custom templates if you wish to change the syntax to match your personal style. The default templates use the standard Laravel syntax, but we like to allow ou have your own flair (see `laravel-craftsman publish` for greater template control).\n\n📝 **User Custom Templates**\n\nIf you wish to create derivatives of the supported templates, you can customize the `config.php` located in the `laravel-craftsman` directory.\nBy default, this will be `~/.composer/vendor/codedungeon/laravel-craftsman`, but may be different depending on the method you chose to install laravel-craftsman.\n\n```php\n    'templates' =\u003e [\n            'class' =\u003e 'user_templates/class.mustache',\n            'api-controller' =\u003e 'user_templates/api-controller.mustache',\n            'binding-controller' =\u003e 'user_templates/binding-controller.mustache',\n            'empty-controller' =\u003e 'user_templates/empty-controller.mustache',\n            'command' =\u003e 'user_templates/command.mustache',\n            'controller' =\u003e 'user_templates/controller.mustache',\n            'events' =\u003e 'user_templates/event.mustache',\n            'factory' =\u003e 'user_templates/factory.mustache',\n            'listener' =\u003e 'user_templates/listener.mustache',\n            'migration' =\u003e 'user_templates/migration.mustache',\n            'model' =\u003e 'user_templates/model.mustache',\n            'request' =\u003e 'user_templates/request.mustache',\n            'rule' =\u003e 'user_templates/rule.mustache',\n            'seed' =\u003e 'user_templates/seed.mustache',\n            'test' =\u003e 'user_templates/tested.mustache',\n            'view-create' =\u003e 'user_templates/view-create.mustache',\n            'view-edit' =\u003e 'user_templates/view-edit.mustache',\n            'view-index' =\u003e 'user_templates/view-index.mustache',\n            'view-show' =\u003e 'user_templates/view-show.mustache',\n        ],\n```\n\n📝 **Single Use Template**\n\nIn addition to creating templates and configuring the `config.php` file, you may optionally supply a template to be used as single use (not stored) from all command execution\nFor example, if you wish to create a standard class asset, you can use a single use template as follows:\n\n\u003cproject\u003e Placeholder to represent current project directory\n./ Placeholder to represent current project directory\n\u003croot\u003e Placeholder to computer root directory\n\n```bash\n\n\u003e laravel-craftsman craft:class App/Services/Syncronize --template \"\u003cproject\u003e/templates/service.mustache\"\n\n\n\u003e laravel-craftsman craft:class App/Services/Syncronize --template \"./templates/model.mustache\"\n\n\u003e laravel-craftsman craft:class App/Services/Syncronize --template \"\u003croot\u003e/templates/model.mustache\"\n```\n\n📝 **Template Variables**\n\nThe following variables can be used in any of the supported templates (review the `templates` directory for a basis of how to create custom templates)\n\n| Variable Name | Templates which variable is used                                                            |\n| ------------- | ------------------------------------------------------------------------------------------- |\n| `binding`     | Used by `binding controller`                                                                |\n| `fields`      | Used by `migration`                                                                         |\n| `model`       | Used by `api-controller`, `class`, `controller`, `factory`, `migration`, `model` and `seed` |\n| `model_path`  | Used by `api-controller`, `controller`, `factory`, `migration`, `seed`                      |\n| `name`        | Used by `event`, `listener`, `rule`, `api-controller`, `controller` and `empty-controller`  |\n| `namespace`   | Used by `class`, `model`                                                                    |\n| `num_rows`    | Used by `seed`                                                                              |\n| `rules`       | Used by `request`                                                                           |\n| `tablename`   | Used by `controller`, `migration`, `model`                                                  |\n| `extends`     | Used by `views`                                                                             |\n| `section`     | Used by `views`                                                                             |\n| `foreign`     | Used by `migration`                                                                         |\n| `current`     | Used by `migration`                                                                         |\n\n## License\n\nCopyright \u0026copy; 2019-2020 Mike Erickson\nReleased under the MIT license\n\n## Credits\n\nlaravel-craftsman written by Mike Erickson\n\nE-Mail: [codedungeon@gmail.com](mailto:codedungeon@gmail.com)\n\nTwitter: [@codedungeon](http://twitter.com/codedungeon)\n\nWebsite: [codedungeon.io](http://codedungeon.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeerickson%2Flaravel-craftsman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeerickson%2Flaravel-craftsman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeerickson%2Flaravel-craftsman/lists"}