PHPackages                             jfheinrich-eu/laravel-make-commands - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jfheinrich-eu/laravel-make-commands

ActiveLibrary[CLI &amp; Console](/categories/cli)

jfheinrich-eu/laravel-make-commands
===================================

This package is aimed to be a suite of artisan commands and tools to help make the work easier.

3.2.3(2y ago)0852MITPHP

Since Nov 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jfheinrich-eu/Laravel-Make-Commands)[ Packagist](https://packagist.org/packages/jfheinrich-eu/laravel-make-commands)[ Docs](https://packagist.org/packages/jfheinrich-eu/laravel-make-commands)[ RSS](/packages/jfheinrich-eu-laravel-make-commands/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (14)Versions (46)Used By (0)

[![](assets/laravel-make-commands-logo.png)](assets/laravel-make-commands-logo.png)

Laravel Make Commands
======================

[](#laravel-make-commands-)

[![Owner](https://camo.githubusercontent.com/f938ee32f4a13b52f33ec8a78ff988637443029d5a7dab1008f191bdd5e3a038/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6f776e65722e7376673f6a6f623d626164676573)](https://camo.githubusercontent.com/f938ee32f4a13b52f33ec8a78ff988637443029d5a7dab1008f191bdd5e3a038/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6f776e65722e7376673f6a6f623d626164676573)[![Package](https://camo.githubusercontent.com/d2cb080efe18e8bfb2562b9c8cd249b18b1268aeda331aa201eb48483653b911/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6e616d652e7376673f6a6f623d626164676573)](https://camo.githubusercontent.com/d2cb080efe18e8bfb2562b9c8cd249b18b1268aeda331aa201eb48483653b911/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6e616d652e7376673f6a6f623d626164676573)[![Release](https://camo.githubusercontent.com/bed7db8e7cb9682f3d1dbc90d0d79602b9107076084c032e5076737a96a97b6c/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f72656c656173652e7376673f6a6f623d626164676573)](https://camo.githubusercontent.com/bed7db8e7cb9682f3d1dbc90d0d79602b9107076084c032e5076737a96a97b6c/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f72656c656173652e7376673f6a6f623d626164676573)[![Code Coverage](https://camo.githubusercontent.com/4ee4063b55df5dd765edf6a69c4470d2474de8794242a479bb0177e93b172a7f/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f6261646765732f6d61696e2f636f7665726167652e7376673f6a6f623d7465737462656e6368)](https://camo.githubusercontent.com/4ee4063b55df5dd765edf6a69c4470d2474de8794242a479bb0177e93b172a7f/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f6261646765732f6d61696e2f636f7665726167652e7376673f6a6f623d7465737462656e6368)[![Last Activity](https://camo.githubusercontent.com/612a4ec9ccbeaeacbfdcbe7a09fecf0b3e9cee04701a9c6d14f80a4ebe926884/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6c6173745f61637469766974795f61742e7376673f6a6f623d626164676573)](https://camo.githubusercontent.com/612a4ec9ccbeaeacbfdcbe7a09fecf0b3e9cee04701a9c6d14f80a4ebe926884/68747470733a2f2f6769746c61622e636f6d2f6a666865696e726963682d65752f6c61726176656c2d6d616b652d636f6d6d616e64732f2d2f6a6f62732f6172746966616374732f6d61696e2f7261772f7075626c69632f6261646765732f6c6173745f61637469766974795f61742e7376673f6a6f623d626164676573)

This package is aimed to be a suite of artisan commands and tools to help make the work easier.

- [Installation](#installation)
- [Make interface (make-commands:interface)](#make-interface-make-commandsinterface)
    - [Example](#example)
- [Make repository (make-commands:repository)](#make-repository-make-commandsrepository)
    - [Usage:](#usage)
    - [Example](#example-1)
- [Make a service (make-commands:service)](#make-a-service-make-commandsservice)
    - [Example](#example-2)
- [Data transfer object (DTO) (make-commands:dto)](#data-transfer-object-dto-make-commandsdto)
    - [Usage](#usage-1)
    - [Example](#example-3)
    - [Work with the hydration functionality](#work-with-the-hydration-functionality)
    - [Object Hydration](#object-hydration)
- [JSON database seeder](#json-database-seeder)
    - [Usage](#usage-2)
- [Create JSON datafiles from database (make-commands:seeder-data)](#create-json-datafiles-from-database-make-commandsseeder-data)
    - [Example](#example-4)
- [Extend Eloquent model to use views](#extend-eloquent-model-to-use-views)
    - [Example](#example-5)
- [IDE - Helper Support for View model](#ide-helper-support-for-view-model)
- [Credits](#credits)

Installation
------------

[](#installation)

```
$ composer require jfheinrich-eu/laravel-make-commands
```

To publish the assets and config file, run following command:

```
$ php artisan make-commands:install
```

This install the config file to \[Project root\]/app/config/make-commands.php and the stubs to \[Project root\]/stubs/make-commands.

To install only the config file, use this command:

```
$ php artisan vendor:publish --tag make-commands-config
```

To install only the stubs, use this command:

```
$ php artisan vendor:publish --tag make-commands-assets
```

Make interface (make-commands:interface)
----------------------------------------

[](#make-interface-make-commandsinterface)

Creates a new interface in `app\Contracts`

```
php artisan make-commands:interface Interface
```

### Example

[](#example)

```
$ php artisan make-commands:interface TestInterface
$ cat app/Contracts/TestInterface.php
