PHPackages                             amamarul/boiler-plate-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. [Admin Panels](/categories/admin)
4. /
5. amamarul/boiler-plate-commands

ActiveLibrary[Admin Panels](/categories/admin)

amamarul/boiler-plate-commands
==============================

Package to generate automatic cruds for Laravel BoilerPlate Apps

1.0.2(9y ago)121.6k4[2 issues](https://github.com/amamarul/boiler-plate-commands/issues)MITPHP

Since Jan 9Pushed 8y ago5 watchersCompare

[ Source](https://github.com/amamarul/boiler-plate-commands)[ Packagist](https://packagist.org/packages/amamarul/boiler-plate-commands)[ RSS](/packages/amamarul-boiler-plate-commands/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

BoilerPlateCommands
===================

[](#boilerplatecommands)

Package to generate automatic cruds for Laravel BoilerPlate Apps \[[Laravel 5 Boilerplate](https://github.com/rappasoft/laravel-5-boilerplate)\]

The amamarul:crud make:
1 - Model
2 - Model Trait Attribute
3 - Model Trait Relationship
4 - Model Trait Scope
5 - Form Request
6 - Controller
7 - Datatable as Service for Controller
8 - Routes
9 - Breadcrumbs

Install Boilerplate
===================

[](#install-boilerplate)

```
$ git clone https://github.com/rappasoft/laravel-5-boilerplate.git
```

```
$ cd laravel-5-boilerplate
```

```
$ composer install
```

Duplicate .env.example and rename to .env
-----------------------------------------

[](#duplicate-envexample-and-rename-to-env)

```
$ php artisan key:generate
```

Set Database in .env
--------------------

[](#set-database-in-env)

Install Package (Laravel)
=========================

[](#install-package-laravel)

Via Composer
------------

[](#via-composer)

```
$ composer require amamarul/boiler-plate-commands
```

### Require Datatables Package

[](#require-datatables-package)

```
$ composer require yajra/laravel-datatables-buttons:^1.1
```

Service Provider

```
Yajra\Datatables\ButtonsServiceProvider::class
```

Configuration and Assets

```
$ php artisan vendor:publish --tag=datatables-buttons
```

Add the following to the AppServiceProvider in the register function:
---------------------------------------------------------------------

[](#add-the-following-to-the-appserviceprovider-in-the-register-function)

### app/Providers/AppServiceProvider.php

[](#appprovidersappserviceproviderphp)

```
/*
 * Load third party local providers
 */
$this->app->register(\Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider::class);
```

The register function should look like this
-------------------------------------------

[](#the-register-function-should-look-like-this)

```
public function register()
{
    /*
     * Sets third party service providers that are only needed on local/testing environments
     */
    if ($this->app->environment() == 'local' || $this->app->environment() == 'testing') {
        /**
         * Loader for registering facades.
         */
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();

        /*
         * Load third party local providers
         */
        $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);

        /*
         * Load third party local aliases
         */
        $loader->alias('Debugbar', \Barryvdh\Debugbar\Facade::class);

        /*
         * Load third party local providers
         */
        $this->app->register(\Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider::class);
    }
}
```

Publish the views
-----------------

[](#publish-the-views)

```
$ php artisan vendor:publish --provider='Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider'
```

Usage
=====

[](#usage)

You need the tables migrated

create migration
----------------

[](#create-migration)

```
$ php artisan make:migration create_products_table
```

```
