Intro
If you didn’t already, follow theREADME.md
file or Quickstart guide to setup the project requirements.
When using SQLite as your database, it’s recommended to have WAL enabled in
config/database.php
. It’s enabled by default. If you don’t want to use it,
just comment out or delete the last 3 settings under connections.sqlite
;
busy_timeout, journal_mode and synchronous.When you run
migrate:fresh
on existing SQL database with WAL enabled, your
will probably get an error “General error: 11 database disk image is
malformed”. After that, just run the command once more. This has been
reported on offical Laravel GitHub.Database
Run database migrations
This command will create tables defined indatabase/migrations
.
Generate dummy content
Run only after migrations.
database/seeders/DatabaseDemoSeeder.php
This command seeds the dummy demo data for you, so you can skip all other steps in this section.
If you prefer to do data seeds manually, follow the steps below.
Seed core data
Run only after migrations.
database/seeders/DatabaseSeeder.php
.
Seed modules data
Run only after migrations.
modules/{name}/database/seeders
.
You can create your own module seeders in
database/seeders
folder and then
you don’t need to run this command. Or you can modify default seeders.Refresh migrations and core data
This command will re-create all tables and seed new data for core application.All previously saved data will be removed.
This will not generate modules tables, but not dummy data.
Refresh migrations and all data
This command will re-create all tables and seed new data for core application and modules.All previously saved data will be removed.
This will generate modules dummy data.
It’s recommended to define your own seeders for modules you will use and just
run Laravel seeder command
php artisan db:seed
, instead of updating modules
seeder files.Enums
Every enum that comes with the boilerplate uses theapp/Traits/HasEnumOptions.php
trait which extends the enums with custom key-value options, options for select inputs and customized name.
For example, RoadmapType
enum is using getDescriptiveName
function to keep the enum names short, but provide more context when using it as part of your UI in options format.
Get key-value options
Get options for select
Get name
Observers
Full docs coming soon…Optimization
Run this command to cache your config, events, routes and views (NOTE: highly recommended for non-local environments):Code formatting
uses Laravel Pint for code formatting. If you prefer to follow same code style then run this command (NOTE: this will modify all your files):Models
folder or User.php
file, depends which one you run):
For more detailed usage of the plugin, please visit the official docs.
Debugbar
comes with Debugbar for Laravel so you can debug your application easier and faster.Use the Debugbar only in development.
DEBUGBAR_ENABLED
to true
in your .env
.