PHPackages                             kukuhkkh/laravel-command - 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. kukuhkkh/laravel-command

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

kukuhkkh/laravel-command
========================

Create a Repository and Service class and trait using Artisan CLI

1.1.1(3y ago)2114MITPHP

Since Dec 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/KukuhKKH/laravel-command)[ Packagist](https://packagist.org/packages/kukuhkkh/laravel-command)[ RSS](/packages/kukuhkkh-laravel-command/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

[![issues](https://camo.githubusercontent.com/fd50810e6590456da0afc85203f3ba38c18c8223b6b99d3ade0bba28d8dc7ded/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f3f7374796c653d666c6174266c6f676f3d6170707665796f72)](https://camo.githubusercontent.com/fd50810e6590456da0afc85203f3ba38c18c8223b6b99d3ade0bba28d8dc7ded/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f3f7374796c653d666c6174266c6f676f3d6170707665796f72)[![forks](https://camo.githubusercontent.com/a693dcf1b720c2cd29d78553082bda4c5c57e929a414f239d81665ef27771a1c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f7374796c653d666c6174266c6f676f3d6170707665796f72)](https://camo.githubusercontent.com/a693dcf1b720c2cd29d78553082bda4c5c57e929a414f239d81665ef27771a1c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f7374796c653d666c6174266c6f676f3d6170707665796f72)[![stars](https://camo.githubusercontent.com/fc6ee614d39b196da84eb3c2cd1395df6f1f12a919f96f0d27cab0be238968b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f7374796c653d666c6174266c6f676f3d6170707665796f72)](https://camo.githubusercontent.com/fc6ee614d39b196da84eb3c2cd1395df6f1f12a919f96f0d27cab0be238968b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756b75686b6b682f6c61726176656c2d636f6d6d616e643f7374796c653d666c6174266c6f676f3d6170707665796f72)[![GitHub license](https://camo.githubusercontent.com/757a7a907e9205ab9d219405e96eca4dd43ed325595ea22b8040244733d2a5ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b756b75686b6b682f6c61726176656c2d636f6d6d616e64)](https://github.com/kukuhkkh/laravel-command/blob/master/LICENSE)

Laravel More Command
====================

[](#laravel-more-command)

Laravel More Command is a collection of a few `php artisan` commands. You can use it to create a **Repository, Repository with Interface, Service, Trait, View(blade file)**, and **Clear Log** from the command line using `php artisan` command.

\[Note : This package also worked for [nWidart/laravel-modules](https://github.com/nWidart/laravel-modules)\]

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

[](#installation)

Require the package with composer using the following command:

```
composer require kukuhkkh/laravel-command --dev

```

Or add the following to your composer.json's require-dev section and `composer update`

```
"require-dev": {
        "kukuhkkh/laravel-command": "^1.0.0"
    }
```

Artisan Command List
--------------------

[](#artisan-command-list)

1. [Make Repository](#Make-Repository)
2. [Make Service](#Make-Service)
3. [Make Trait](#Make-Trait)
4. [Make View](#Make-View)
5. [Log Clear](#Log-Clear)

Make Repository
---------------

[](#make-repository)

**Create a repository Class.**
`php artisan make:repository your-repository-name`

Example:

```
php artisan make:repository UserRepository

```

or

```
php artisan make:repository Backend\UserRepository

```

The above will create a **Repositories** directory inside the **App** directory.\\

**Create a repository with Interface.**
`php artisan make:repository your-repository-name -i`

Example:

```
php artisan make:repository UserRepository -i

```

or

```
php artisan make:repository Backend\UserRepository -i

```

Here you need to put extra `-i` flag. The above will create a **Repositories** directory inside the **App** directory.

###### In [nWidart/laravel-modules](https://github.com/nWidart/laravel-modules) Modules

[](#in-nwidartlaravel-modules-modules)

**Create a repository Class.**
`php artisan module:make-repository your-repository-name {module-name}`

Example:

```
php artisan module:make-repository UserRepository Blog

```

or

```
php artisan module:make-repository Backend\UserRepository Blog

```

The above will create a **Repositories** directory inside the **{Module}** directory.

**Create a repository with Interface.**
`php artisan module:make-repository your-repository-name {module-name} -i`

Example:

```
php artisan module:make-repository UserRepository -i Blog

```

or

```
php artisan module:make-repository Backend\UserRepository -i Blog

```

Here you need to put extra `-i` flag. The above will create a **Repositories** directory inside the **{Module}** directory. \\

**An Example of created repository class:**

```
