Skip to content

jeffochoa/voyager-bread-generator

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

Voyager BREAD generator

There is a common issue when we try to deploy local projects to a different environment. Currently, we need to export the database or so, in order to keep all the new BREADs structure across all the environments.

The only way to do that without having to create a database import each time is by creating the migrations, seeds, etc. for each bread.

This allows the developers to create new BREADs from the command line using Artisan.

How to use:

create a new bread

php artisan voyager:bread books

You can also generate the model and migration files

php artisan voyager:bread books --migration --model

Configure the bread

This command will create a new BooksBreadSeeder file with the basic configuration for a new bread-seed, there you can add/edit all the bread fields. See DataRowsTableSeeder

Once the seeder is done you need to run:

php artisan db:seed --class=BooksBreadSeeder

Optionally you need to re-generate the permissions from the command line

php artisan db:seed --class=PermissionRoleTableSeeder

You can also do this manually from the admin panel

Don't forget to run the new migration

php artisan migrate

About

Create BREAD from the console using artisan

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages