lanciweb / laravel-make-view
A Laravel package that allows to generate blade views via Artisan
Installs: 2 093
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-package
Requires (Dev)
- orchestra/testbench: ^8.0
README
Laravel MakeView is a Laravel Package that allows to generate views via an artisan command.
Installation
Use composer to install MakeView.
composer require lanciweb/laravel-make-view
Usage
Single view:
Use the commands below and the dot notation to easily create the blade files for your views:
php artisan make:view home
# creates 'home.blade.php' in the 'resources/views' folder.
php artisan make:view guests.home # creates 'home.blade.php' in the 'resources/views/guests' folder. # The folder is created if it does not exists yet.
php artisan make:view backoffice.admin.home # creates 'home.blade.php' in the 'resources/views/backoffice/admin' folder. # All folders are created if they do not exist yet.
Crud Option:
Use the CRUD option to immeiately create the folder and the conventional resource views:
php artisan make:view posts --crud # creates 'index.blade.php', 'show.blade.php`, `create.blade.php' and `edit.blade.php' # in the 'resources/views/posts' folder.
php artisan make:view posts -c
# shorthand for the same result as above
php artisan make:view admin.posts -c # creates 'index.blade.php', 'show.blade.php`, `create.blade.php' and `edit.blade.php' # in the 'resources/views/admin/posts' folder.