Build a powerful Laravel 5 app with Grafite

Taken directly from the Grafite website

Create the application scaffold

Taken directly from the Grafite Builder getting started documentation.

$ laravel new grafite-crud
$ composer require "grafite/builder"
$ php artisan vendor:publish
> press 0 for everything
$ php artisan grafite:starter
$ php artisan grafite:bootstrap
> yes overwrite files

There are some additional configuration steps to follow here.

The above grafite:bootstrap command automatically generates a User Interface with Bootstrap 4.0.

Running Migrations

Don’t forget to run:

$ composer dump


$ php artisan migrate --seed

This will create an admin user with appropriate permissions. The credentials by default are / admin.

Helpful hints from Grafite

The Grafite CLI provides detailed instructions about files to change to make your app work.

Laravel specific

Copy over a new environment file, set your application key, create your database and change MAIL_DRIVER=log to test emails locally. By default the Grafite starter command automatically generates an admin user and the infrastructure so that users need to click a link in a confirmation email to be valid.

It can also be helpful to install laravel-log-viewer for quickly navigating to the log file (where user confirmation emails will be stored).

The CRUD Maker

To generate a new table and CRUD actions we can use the Grafite CRUD Maker.

php artisan crudmaker:new Todo