briantweed/laravel-view-folder

Artisan command to create a view folder structure with sub folders for partials, components and modals. Option to add basic CRUD files to the parent folder (create, edit, update, delete) and additional files to each folder.

v1.0 2018-10-17 10:25 UTC

This package is auto-updated.

Last update: 2022-10-29 03:19:35 UTC


README

Command to create a view folder structure with sub folders for partials, components and modals.

Option to add basic CRUD files to the parent folder (create, edit, update, delete) and additional files to each folder.


Installation

Via Composer

$ composer require --dev briantweed/laravel-view-folder

You then need to publish the template files. Run the command:

php artisan vendor:publish

Then type in the number that matches against this package. The files will be published to a stubs folder in the resources directory.


Basic Usage

Use the command:

php artisan make:view

You will then be asked a series of questions:

What is the folder path (use can use forward slashes or dots)?
Would you like a sub-folder for partials? (yes/no)
Would you like a sub-folder for components? (yes/no)
Would you like a sub-folder for modals? (yes/no)
Would you like to add CRUD files? (yes/no)

If you answer yes to a question you are then asked if you want to add files to the folder.
Either leave blank or enter a comma delimited string for all the files you want to create.


Additional Options

You can specify the folder structure with the command:

php artisan make:view pages.admin.users

or

php artisan make:view pages/admin/users

You can specify which sub folders you would like to include be adding one or more of the following options:

--p : add partials subfolder
--c : add components subfolder
--m : add modals subfolder
--f : add CRUD files

Example

php artisan make:view pages.admin.test --p --f

This will create a pages/admin/test folder structure with a partials subfolder and the CRUD files.


Contributing

Please see contributing.md for details and a todolist.


Credits


License

MIT. Please see the license file for more information.