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
####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
- 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
```
- Add the service providers to config/app.php:
```php
Amranidev\ScaffoldInterface\ScaffoldInterfaceServiceProvider::class,
Amranidev\Ajaxis\AjaxisServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class,
```
- Publish the assets in your application with:
```
$ php artisan vendor:publish
```
- Migrate for the Scaffold Interface table:
```
$ php artisan migrate
```
- Auth scaffolding:
```
$ php artisan make:auth
```
Congratulations, you have successfully installed Scaffold Interface!
###II. Quick Start
-
Access to Scaffold Interface:
http://{your-project}/scaffold to get into Scaffold Interface.
-
Table creation:
You can add many of attributes such as a string, date, longtext,etc.
-
After the creation, to complete your scaffolding, go to the terminal and run:
$ php artisan migrate
-
Finally :
Go to http://{your-project}/{your-model} to see the result.
-
Rollback :
If you want to rollback the table just check this:
Before you make your rollback make sure that you have rolled back your table in the database.
-
Dashboard:
Go ahead and create a new user,
$ php artisan tinker
:$user = new \App\User(); $user->name = "john doe"; $user->email = "[email protected]"; $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 : [email protected]