Skip to content
On this page

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.

  1. Run cp draft.yaml.example draft.yaml command to copy and create a new draft.yaml files.
  2. 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
  1. Run php artisan blueprint:build to generate your files.
  2. For more configuration according to your need. See Blueprint.

COPYRIGHT © 2022 Codeshaper, All rights reserved.