Laravel Shift Blueprint

Laravel Shift Blueprint

Laravel Shift Blueprint is a code generation tool for Laravel developers by Jason McCreary:

Blueprint is an open-source tool for rapidly generating multiple Laravel components from a single, human-readable definition.

Blueprint works by using a draft file (YAML) that contains definitions of the components it should generate. The readme provides an example draft.yml file in the root of a Laravel v6.x project:

models:
  Post:
    title: string:400
    content: longtext
    published_at: nullable timestamp

controllers:
  Post:
    index:
      query: all
      render: post.index with:posts

    store:
      validate: title, content
      save: post
      send: ReviewNotification to:post.author with:post
      dispatch: SyncMedia with:post
      fire: NewPost with:post
      flash: post.title
      redirect: post.index

The draft file produces a Post model with fillable fields, attribute casts, dates, and relationships. For a full list of examples, be sure to check out the project’s readme.

The quickest way to understand what Blueprint is all about is watching this Building Blueprint demo:

You can learn more about this package, get full installation instructions, and view the source code on GitHub at laravel-shift/blueprint.

Filed in: News / packages
Laravel News Partners

Laravel Jobs

Backend Software Engineer (PHP Developer)
Austin TX, Bonita Springs FL
Certified eSupport Corp
Backend PHP Developer
Hamburg, Germany
ABOUT YOU GmbH
Full-Stack Engineer (Mid to Senior)
Remote (EST, CST)
Voxie
Senior Laravel Developer (AI Applications)
Remote from anywhere in the UK or from our London office
GreenShoot Labs
Full Stack Engineer
Remote
Shelterluv

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.