:rocket: A Smart CRUD Generator For Laravel

Overview

SensioLabsInsight

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

Scaffold

Features

  • Generate your models, views, controllers, routes and migrations just in a few clicks.

  • Models visualization through a graph presentation (New Feature).

  • Views scaffolding support Bootstrap and Materialize css.

  • Generate (OneToMany,ManyToMany) relationships including views and controllers.

  • Websockets using pusher notifications.

  • 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.

  • Rollback possibility.

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

Installation

  1. Run the following command:

composer require amranidev/scaffold-interface

  1. Add the service providers to config/app.php:
Amranidev\ScaffoldInterface\ScaffoldInterfaceServiceProvider::class,
Amranidev\Ajaxis\AjaxisServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class,
Pusher\Laravel\PusherServiceProvider::class,
  1. Publish the assets in your application with:

php artisan vendor:publish

  1. Run migrations:

php artisan migrate

  1. Authentication scaffolding:

php artisan make:auth

  1. Add HasRole dependency to app/User.php:
<?php

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use Notifiable;
    use HasRoles;
}

Congratulations, you have successfully installed Scaffold Interface!

Detailed Documentation

Full documentation.

Contribution

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

Author

Credits

Contact : [email protected]

Issues
  • Error with Views

    Error with Views

    Hi,

    I install your package and I got some problems with views.

    I see vars like : {{errorMsg}} , {{final.table}}, {{final.onData}}, {{element}} ...

    And actions buttons (new, remove, more, back...) are not working

    Maybe I need to install some pacakges to make it work?

    Thanks.

    enhancement 
    opened by ManuSbd 15
  • delete button doesn't work

    delete button doesn't work

    After migrate rollback the delete button doesn't display everything, only a white bar. deletebutton

    opened by davejal 11
  • "Prefix" on views and controllers

    Hi, Amrani.

    I want to know if theres a way to generate the views with a prefix, like “admin”, for example.

    The point is, I have a lot of manual work to migrate the scaffold views to my project architecture.

    Can you help? Thanks #

    enhancement New Feature 
    opened by oscarnascimento 8
  • Error

    Error

    @Amrani Interesting,

    testing, http://crud/scaffold/guipost

    I get MethodNotAllowedHttpException in RouteCollection.php line 219:

    opened by montes2012 6
  • btn delete doesn't work in this version 1.6.31

    btn delete doesn't work in this version 1.6.31

    When I generate a GRUD, btn delete doesn't work more, how can I downgrade to other version? can I do it?

    opened by 7miguelsilva7 5
  • this project is not working?

    this project is not working?

    I have installed and go into the site, and I have created a table and some columns, but I didn't see any changing. so I tried to make migration, but still not change any files or database, and I didn't see any request in network when I create table and columns, just when I do make migration, and it just redirect to the scaffolder page, and shows me nothing to migrate.

    opened by abellee 5
  • vinkla/pusher requires php 7

    vinkla/pusher requires php 7

    An update in the docs may be in order, as it looks like the vinkla/pusher package is not supporting 5.6.

    Information Important 
    opened by jwjcmw 5
  • one to many

    one to many

    Hi! Thanks for the CRUD generator. I can't get one2many to work I create table citys and have a column nammed cityName.

    Then when I create table members I click "One to many" I chose table citys and column cityName. Then I generate table members and its scripts. I expect a dropdown to show up when I want to add a member, but it doesnt.

    opened by spitfire64 5
  • fill new table errors

    fill new table errors

    (3/3) ErrorException Trying to get property of non-object (View: D:\php\OpenServer\domains\lava\blog\resources\views\scaffold-interface\layouts\app.blade.php) (View: D:\php\OpenServer\domains\lava\blog\resources\views\scaffold-interface\layouts\app.blade.php)

    (2/3) ErrorException Trying to get property of non-object (View: D:\php\OpenServer\domains\lava\blog\resources\views\scaffold-interface\layouts\app.blade.php)

    (1/3) ErrorException Trying to get property of non-object

    in 8419f0d3f3f8c20cb024e94a862960099ac86cc6.php (line 65)

    opened by jorjik 5
  • Installation failed with Laravel 5.5

    Installation failed with Laravel 5.5

    Installation failed

    $ composer require amranidev/scaffold-interface
    Using version ^1.7 for amranidev/scaffold-interface
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Conclusion: don't install amranidev/scaffold-interface v1.7.15
        - Conclusion: don't install amranidev/scaffold-interface v1.7.1
        - Conclusion: remove laravel/framework v5.5.13
        - Installation request for amranidev/scaffold-interface ^1.7 -> satisfiable by amranidev/scaffold-interface[v1.7.0, v1.7.1, v1.7.15].
        - Conclusion: don't install laravel/framework v5.5.13
        - amranidev/scaffold-interface v1.7.0 requires vinkla/pusher ^2.4 -> satisfiable by vinkla/pusher[2.4.0, 2.5.0].
        - vinkla/pusher 2.4.0 requires illuminate/support 5.1.* || 5.2.* || 5.3.* -> satisfiable by illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4].
        - vinkla/pusher 2.5.0 requires illuminate/support 5.3.* || 5.4.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
        - don't install illuminate/support v5.1.1|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.13|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.16|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.2|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.20|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.22|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.25|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.28|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.30|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.31|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.41|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.6|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.1.8|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.0|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.19|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.21|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.24|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.25|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.26|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.27|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.28|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.31|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.32|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.37|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.43|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.45|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.6|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.2.7|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.3.0|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.3.16|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.3.23|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.3.4|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.0|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.13|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.17|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.19|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.27|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.36|don't install laravel/framework v5.5.13
        - don't install illuminate/support v5.4.9|don't install laravel/framework v5.5.13
        - Installation request for laravel/framework (locked at v5.5.13, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.13].
    
    
    Installation failed, reverting ./composer.json to its original content.
    
    

    Environment

    • PHP 7.0.14
    • laravel/framework 5.5.13

    Cause

    vinkla/laravel-pusher ^2.4 is old. Not supported illuminate/contracts and illuminate/support 5.5.*.

    https://github.com/vinkla/laravel-pusher/blob/2.5.0/composer.json

        "require": {
            "php": "^7.0",
            "illuminate/contracts": "5.3.* || 5.4.*",
            "illuminate/support": "5.3.* || 5.4.*",
            "graham-campbell/manager": "^2.5",
            "pusher/pusher-php-server": "^2.6"
        },
    

    https://github.com/vinkla/laravel-pusher/blob/3.0.0/composer.json

       "require": {
            "php": "^7.0",
            "illuminate/contracts": "5.3.* || 5.4.* || 5.5.*",
            "illuminate/support": "5.3.* || 5.4.* || 5.5.*",
            "graham-campbell/manager": "^3.0",
            "pusher/pusher-php-server": "^3.0"
        },
    
    opened by imunew 4
  • Erro ao instalar esse pacote

    Erro ao instalar esse pacote

    composer require amranidev/scaffold-interface

    Using version ^1.7 for amranidev/scaffold-interface ./composer.json has been updated Running composer update amranidev/scaffold-interface --with-all-dependencies Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

    Problem 1 - Conclusion: don't install amranidev/scaffold-interface v1.7.22 (conflict analysis result) - Conclusion: don't install amranidev/scaffold-interface v1.7.24 (conflict analysis result) - amranidev/scaffold-interface[v1.7.0, ..., v1.7.15] require spatie/laravel-permission ^1.5 -> satisfiable by spatie/laravel-permission[1.5.0, ..., v1.x-dev]. - spatie/laravel-permission[1.18.0, ..., v1.x-dev] require laravel/framework ~5.1.11|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0 -> found laravel/framework[v5.1.11, ..., 5.8.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission[1.5.0, ..., 1.5.1] require laravel/framework ^5.1.11 -> found laravel/framework[v5.1.11, ..., 5.8.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission[1.5.2, ..., 1.6.1] require laravel/framework ~5.1.11|~5.2.0|~5.3.0 -> found laravel/framework[v5.1.11, ..., 5.3.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission[1.7.0, ..., 1.12.0] require laravel/framework ~5.1.11|~5.2.0|~5.3.0|~5.4.0 -> found laravel/framework[v5.1.11, ..., 5.4.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission[1.13.0, ..., 1.15.0] require laravel/framework ~5.1.11|~5.2.0|~5.3.0|~5.4.0|~5.5.0 -> found laravel/framework[v5.1.11, ..., 5.5.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission[1.16.0, ..., 1.16.1] require laravel/framework ~5.1.11|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0 -> found laravel/framework[v5.1.11, ..., 5.6.x-dev] but it conflicts with your root composer.json require (^7.0). - spatie/laravel-permission 1.17.0 requires laravel/framework ~5.1.11|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0 -> found laravel/framework[v5.1.11, ..., 5.7.x-dev] but it conflicts with your root composer.json require (^7.0). - Root composer.json requires amranidev/scaffold-interface ^1.7 -> satisfiable by amranidev/scaffold-interface[v1.7.0, ..., v1.7.24]. - Conclusion: don't install laravel/framework v7.0.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.4 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.5 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.6 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.7 (conflict analysis result) - Conclusion: don't install laravel/framework v7.0.8 (conflict analysis result) - Conclusion: don't install laravel/framework v7.1.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.1.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.1.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.1.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.2.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.2.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.2.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.3.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.4.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.5.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.5.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.5.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.6.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.6.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.6.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.7.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.7.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.8.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.8.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.9.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.9.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.9.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.10.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.10.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.10.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.10.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.11.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.12.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.13.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.14.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.14.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.15.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.16.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.16.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.17.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.17.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.17.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.18.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.19.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.19.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.20.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.21.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.22.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.22.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.22.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.22.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.22.4 (conflict analysis result) - Conclusion: don't install laravel/framework v7.23.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.23.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.23.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.24.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.25.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.26.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.26.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.27.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.28.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.28.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.28.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.28.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.28.4 (conflict analysis result) - Conclusion: don't install laravel/framework v7.29.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.29.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.29.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.29.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.30.0 (conflict analysis result) - Conclusion: don't install laravel/framework v7.30.1 (conflict analysis result) - Conclusion: don't install laravel/framework v7.30.2 (conflict analysis result) - Conclusion: don't install laravel/framework v7.30.3 (conflict analysis result) - Conclusion: don't install laravel/framework v7.30.4 (conflict analysis result) - amranidev/scaffold-interface v1.7.21 requires vinkla/pusher ^3.1.0 -> satisfiable by vinkla/pusher[3.1.0]. - Conclusion: don't install laravel/framework v7.0.0 (conflict analysis result) - vinkla/pusher 3.1.0 requires illuminate/contracts 5.5.* -> satisfiable by illuminate/contracts[v5.5.0, ..., 5.5.x-dev]. - Only one of these can be installed: illuminate/contracts[v5.1.1, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v7.0.0, ..., 7.x-dev]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it. - Root composer.json requires laravel/framework ^7.0 -> satisfiable by laravel/framework[v7.0.0, ..., 7.x-dev].

    Installation failed, reverting ./composer.json and ./composer.lock to their original content.

    opened by WalysonGO 0
  • Library unmaintained - any alternatives ?

    Library unmaintained - any alternatives ?

    seems like there is not much happening here anymore, is there a later version for use in Laravel LTS version's ?

    opened by REPTILEHAUS 1
  • error

    error

    I did the following PHP 7.3.11-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 24 2019 18:23:23) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.11-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

    composer create-project --prefer-dist laravel/laravel blog

    after my laravel installation was ok

    composer require amranidev/scaffold-interface.

    I get the following error

    Problem 1 - Conclusion: don't install amranidev/scaffold-interface v1.7.24 - Conclusion: don't install amranidev/scaffold-interface v1.7.22 - amranidev/scaffold-interface v1.7.21 requires vinkla/pusher ^3.1.0 -> satisfiable by vinkla/pusher[3.1.0]. - Conclusion: don't install vinkla/pusher 3.1.0 - Conclusion: don't install amranidev/scaffold-interface v1.7.15 - Conclusion: don't install amranidev/scaffold-interface v1.7.1 - Conclusion: don't install amranidev/scaffold-interface v1.7.0 - Conclusion: remove laravel/framework v6.5.1 - Installation request for amranidev/scaffold-interface ^1.7 -> satisfiable by amranidev/scaffold-interface[1.8.x-dev, v1.7.0, v1.7.1, v1.7.15, v1.7.21, v1.7.22, v1.7.24].

    Installation request for amranidev/scaffold-interface v1.7.24 -> satisfiable by amranidev/scaffold-interface[v1.7.24]. - Conclusion: remove laravel/framework v6.5.1 - Conclusion: don't install laravel/framework v6.5.1 - amranidev/scaffold-interface v1.7.24 requires spatie/laravel-permission ^2.7 -> satisfiable by spatie/laravel-permission[2.10.0,

    opened by josetiagobispo 2
  • Add support for Laravel 5.8

    Add support for Laravel 5.8

    :smile:

    opened by lsfiege 2
  • Issue on Scaffold Generation

    Issue on Scaffold Generation

    I use Ubuntu 16.04 and PHP 7.2. I have installed the scaffold with Laravel 5.7.19 I'm trying to generate a new table, but it doesn't work. The table is not created and I can not migrate it. Can you help me? Thanks scaffold_crud_error

    opened by paco-portada 1
  • [Feature] migrate to bootstrap 4

    [Feature] migrate to bootstrap 4

    The stable version 4 is released, I think it is a good time to migrate to bootstarp 4.

    opened by tim-hub 2
  • Table name is not following eloquent naming conventions

    Table name is not following eloquent naming conventions

    On example when I want to create a table named "bank_accounts" the Laravel model is expected to be named "BankAccount.php"

    Declaration of $table field would not be required

    opened by Hell4Ge 1
  • Is it possible to edit tables after creating them?

    Is it possible to edit tables after creating them?

    Hi! Thanks for your work. So glad someone is working on something like this. I am trying to figure out the basic logic of the CRUD Generator.

    I have managed to create a bunch of tables. After creating them I migrated and they were created successfully. Creating an one-to-many relationship succeeded after I tried several times and I think after reading the docs I even understand what I may have done.

    Is this designed to work as a tool to tinker with or should I have a clear image in my head about the structure and relations of databases first? Can I add relations after having created the tables already?

    Deleting tables does nothing, Firefox on Mac. Is this still a planned feature? Thanks.

    opened by savolai 1
  • How to add multi-value field?

    How to add multi-value field?

    I'm trying to make one of the user input form fields a drop-down options list. I can do this (add the HTML for the