Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

Add an artisan make:view command #241

Open
@svenluijten

Description

@svenluijten

Adding a command like php artisan make:view would allow the user to generate view files via the command line instead of having to use their editor and/or filesystem.

Some options that may be interesting:

  • php artisan make:view products.index -- Generates products/index.blade.php.
  • php artisan make:view index --extends="_layouts.base" -- Extend an already existing view.
  • php artisan make:view products.index --section="content" -- Scaffold out a section.
  • php artisan make:view products --resource -- Generates an entire resource (products/index.blade.php, products/edit.blade.php, products/show.blade.php & products/create.blade.php).

These features would of course be limited to blade-only. If someone is using Twig (or another templating engine), they might appreciate an option like --extension to set the file extension:

  • php artisan make:view products --extension="html.twig"

I already have an implementation of this here which can be used as inspiration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions