CRUD Generator
Dashcode is comes with crud-generator support with Blueprint package. Blueprint is an open-source tool for rapidly generating multiple Laravel components from a single, human-readable definition.
Working with CRUD generator.
- Run
cp draft.yaml.example draft.yaml
command to copy and create a new draft.yaml files. - Navigate to
draft.yaml
file. and make necessary changes. E.g.
yaml
models:
Post:
title: string:400
content: longtext
published_at: nullable timestamp
relationships:
belongsTo: User
controllers:
Post:
index:
query: all
render: post.index with:posts
store:
validate: title, content
save: post
flash: post.title
redirect: post.index
- Run
php artisan blueprint:build
to generate your files. - For more configuration according to your need. See Blueprint.