/scaffold-interface

:rocket: A Smart CRUD Generator For Laravel

Primary LanguageHTMLMIT LicenseMIT

SensioLabsInsight

Build Status StyleCI Built For Laravel Total Downloads Latest Stable Version Latest Unstable Version License

A Smart CRUD Generator

Using laravel v5.1.* ??, it recommended to use scaffold-interface v1.4.11

Using laravel v5.3.* ??, make sure that routes path is configured, config file

Scaffold

####Features:

  • Generate your model,views,controller and migrations just in a few clicks.

  • Views support Bootstrap and Materializecss.

  • Generate OneToMany relationships including views and controllers.

  • AdminLTE dashboard template with users management system (users-roles-permissions) using laravel-permission.

  • Softdeletes and timestamps.

  • A delete confirmation message.

  • Using an interface to design your table.

  • Rollbacking possibility.

  • Generate CRUD for packages, see Lpackager, CRUD for packages/modules.

###I. Package installation

  1. Run composer require to install Scaffold-Interface:
Add the package to your dependencies in composer.json:

```json
require : {
    "Amranidev/scaffold-interface": "v1.5.*"
}
```

Then update composer:

```
$ composer update
```
  1. Add the service providers to config/app.php:
```php

Amranidev\ScaffoldInterface\ScaffoldInterfaceServiceProvider::class,
Amranidev\Ajaxis\AjaxisServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class,

```
  1. Publish the assets in your application with:
```
$ php artisan vendor:publish

```
  1. Migrate for the Scaffold Interface table:
```
$ php artisan migrate

```
  1. Auth scaffolding:
```
$ php artisan make:auth
```

Congratulations, you have successfully installed Scaffold Interface!

###II. Quick Start

  1. Access to Scaffold Interface:

    http://{your-project}/scaffold to get into Scaffold Interface.

  2. Table creation:

    You can add many of attributes such as a string, date, longtext,etc.

  3. After the creation, to complete your scaffolding, go to the terminal and run:

    $ php artisan migrate
    
    
  4. Finally :

    Go to http://{your-project}/{your-model} to see the result.

  5. Rollback :

    If you want to rollback the table just check this:

    Imgur

    Before you make your rollback make sure that you have rolled back your table in the database.

  6. Dashboard:

    Go ahead and create a new user, $ php artisan tinker:

    $user = new \App\User();
    $user->name = "john doe";
    $user->email = "jhondoe@example.com";
    $user->password = Hash::make("password");
    $user->save();
    

    Then add HasRole to app/User.php:

    use Illuminate\Foundation\Auth\User as Authenticatable;
    use Spatie\Permission\Traits\HasRoles;
    
    class User extends Authenticatable
    {
      use HasRoles;
    
      // ...
    }

    Well, it's time to click on dashboard button or go to http://{your-project}/dashboard.

####Contribution

Any ideas are welcome. Feel free to submit any issues or pull requests.

####Credits

####TODOS

  • 100% Code coverage + Maximum code quality.
  • Allow to generate ManyToMany relationships.

####DONE

  • Users management system (users-roles-permissions).
  • AdminLTE Dashboard.
  • Improve Vuejs.
  • Add a select for OneToMany (on data fields) in interface.
  • Laravel 5.3 supported.
  • Laravel 5.2 supported.
  • Laravel 5.1 supported.

####Contact : amranidev@gmail.com