jimhlad/leapfrog

This package is abandoned and no longer maintained. No replacement package was suggested.

A UI-based CRUD boilerplate generator for Laravel. Quickly create files according to the Controller-Service-Model pattern.

1.1.1 2017-08-22 16:29 UTC

This package is not auto-updated.

Last update: 2022-11-19 07:39:35 UTC


README

Hate writing CRUD code from scratch? Don't want to memorize any more crazy commands?

LeapFrog is a UI-based CRUD boilerplate generator for Laravel. It allows you to quickly create files according to the Controller-Service-Model pattern. Simply point your browser to your-project.dev/leapfrog and go!

For example, if you are creating a new "Truck" entity, it will generate or edit the following files for you:

  • routes/web.php
  • app/Models/Truck.php
  • app/Http/Controllers/TruckController.php
  • app/Services/TruckService.php
  • app/Http/Requests/TruckCreateRequest.php
  • app/Http/Requests/TruckUpdateRequest.php
  • database/migrations/xxxx_xx_xx_xxxxxx_create_trucks_table.php
  • resources/views/truck/index.blade.php
  • resources/views/truck/create.blade.php
  • resources/views/truck/edit.blade.php
  • config/forms/truck.php

The interface allows you to pick which files you want to create and even customize the paths (to some extent).

Click here for screenshots.

Compatibility

This package was tested with Laravel 5.4 and may not work with previous versions of Laravel.

Usage

Step 1: Install with composer

Install the package using composer:

composer require laracasts/generators:dev-master --dev

composer require jimhlad/leapfrog --dev

NOTE: The reason why Laracast Generators must be installed separately is because there is a bugfix for Laravel 5.4 that has not yet been released. Requiring it this way prevents certain minimum stability errors.

Step 2: Register the Service Provider

You'll only want to use this tool for local development, so we can add the following in app/Providers/AppServiceProvider.php:

public function register()
{
    if ($this->app->environment() === 'local') {
        $this->app->register('JimHlad\LeapFrog\LeapFrogServiceProvider');
    }
}

Publish the assets by running:

php artisan vendor:publish --provider="JimHlad\LeapFrog\LeapFrogServiceProvider"

Step 3: Update RouteServiceProvider

Update app/Providers/RouteServiceProvider.php to include the routes/leapfrog.php file by changing:

->group(base_path('routes/web.php'));

to

->group(function() {
    require base_path('routes/web.php');
    require base_path('routes/leapfrog.php');
});

NOTE: You should modify routes/leapfrog.php to ensure that these routes are only accessible within your local environment. This package is for development purposes only.

Step 4: Create app layout

The views generated by this package assume the existence of a views/layouts/app.blade.php file. We can generate this by running the standard:

php artisan make:auth

That's it!

You should now be able to point your browser to your-project.dev/leapfrog to see the LeapFrog dashboard.

Author

If you have any questions please feel free to reach out to me (Jim Hlad) on Twitter: @jimhlad

Special Thanks

This package installs two other awesome packages as dependencies:

License

LeapFrog is open source software licensed under the MIT license.

Bug Reporting and Feature Requests

Please be as detailed as possible when submitting bug reports or feature requests.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.