bencomeau/artisan-make-view
Larablocks Analysis
bencomeau/artisan-make-view works with any PHP project: the latest release (v1.1, Sep 8, 2017) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Sep 8, 2017)
- 0 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Sep 8, 2017.
- No releases in the last 12 months.
- First released: Mar 16, 2017.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require bencomeau/artisan-make-view |
|
| Latest Version: | v1.1 |
| PHP: | >=5.6.4 |
| License: | MIT |
| Last Updated: | Sep 8, 2017 |
| Links: | GitHub · Packagist |
Laravel View Generator
Introduction
Quickly create views and view resources from the Artisan console, saving a surprising amount of time.
Code Samples
Creating views is as easy as:
php artisan make:view user // creates --> index, create, show, edit views in the resources/views/user directory
php artisan make:view user.index // creates --> resources/views/user/index.blade.php
Using something other than blade templates?
php artisan make:view user.index -e twig // creates --> resources/views/index.twig
Want to use a view path you specified in config/view.php?
// If your config/view file looks like this:
'paths' => [
resource_path('views'),
resource_path('my-custom-view-folder')
],
// Then just pass the key you want to use, like this:
php artisan make:view user.index -p 1 // creates --> resources/my-custom-view-folder/index.blade.php
Install
To get started, use composer to require this package:
composer require bencomeau/artisan-make-view --dev
Then simply register the package's Service Provider in your app/Providers/AppServiceProvider.php file:
Note: Laravel
5.5and above uses Package Auto-Discovery; if you are using Laravel>= 5.5it is not necessary to manually add the service provider as shown below.
public function register()
{
if ($this->app->environment('local')) {
$this->app->register(\BenComeau\ArtisanMakeView\ArtisanMakeViewServiceProvider::class);
}
}
And you're ready to quickly generate views!
Usage
To list all command options
php artisan make:view --help
Make a single view by name, in dot notation
php artisan make:view user.index
Make a view resource by passing just the name of the resource
php artisan make:view user -r
Make a view with a custom extension
php artisan make:view user.index -e twig
Make a view and store it in another directory
Note: -p 1 refers to the value of array key of 1 in your config('view.paths') setting.
php artisan make:view user.index -p 1
Combine multiple options to fully-customize the view(s) being created
Note: this will create all resource views in your custom directory, with the twig extension.
php artisan make:view user -r -p 1 -e twig
License
Artisan Make View is open-sourced software licensed under the MIT license.
Related Packages
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v1.1 | >=5.6.4 | MIT | |
| v1.0 | >=5.6.4 | MIT |