usanzadunje / artisan-vue
Multiple templates for your Vue application resources.
Fund package maintenance!
usanzadunje
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^7.0|^8.0|^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^5.10|^6.1
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.22
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-04-09 10:16:18 UTC
README
Multiple templates for your Vue application resources.
Generates components, views, composables(hooks), services and Vuex modules. All paths are easily configurable using config file.
Installation
You can install the package via composer:
composer require usanzadunje/artisan-vue
You can publish the config file with:
php artisan vendor:publish --tag="artisan-vue-config"
This is the contents of the published config file:
return [ // Root directory where your Vue app lives 'vue_root_dir' => resource_path("js"), // Name of the folder which stores views 'views_dir' => 'views', // Name of the folder which stores components 'components_dir' => 'components', // Name of the folder which stores composables(hooks) 'composables_dir' => 'composables', // Path to the folder which stores Vuex modules 'vuex-modules_dir' => 'store/modules', // Name of the folder which stores services 'services_dir' => 'services', ];
Usage
# Generates template for specific resource php artisan vue:make {resource} {path} # Path can be file name(without extension) or path to the file along with its name # Examples: # 1. generates Test.vue in your components directory php artisan vue:make component Test # 2. generates testing folder as well as Test.vue file inside your component directory php artisan vue:make component testing/Test # Lists all resources available for creation php artisan vue:list
Command will take root of your Vue application (which you can specify in config file) append resource folder name (also in config file) and then try and create following:
- All directories you provided in
path
if they do not exist - File itself (last portion of the path is considered file name) with appropriate extension for that resource
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.