时尚迷 / vue-base
此包最新版本(0.1.1)没有提供许可信息。
一个构建可以使用 Vuex 和 Vue Router 的 vue 基础的 artisan 命令
0.1.1
2019-11-14 18:02 UTC
Requires
- php: ^7.1
Suggests
- laravel/framework: Makes use of the laravel eloquent scopes.
This package is auto-updated.
Last update: 2024-08-30 01:11:48 UTC
README
由时尚迷创建
目的
如果你需要在你的网站上创建多个 vue 实例,这个项目是为了构建一个非常简单的 boilerplate 结构。
安装
运行 composer install fashionphile/vue-base;
设置
在你的 base laravel 安装中,在你的配置文件夹里创建一个 vue-base.php 文件。在文件中,你需要添加一个数组,包含你想要 vue 基础安装实例的路径。
<?php return [ 'path' => 'path/to/folder', ];
之后,在你的 app/Console/Kernel.php 文件中 commands 数组里添加以下路径
protected $commands = [ \VueBase\VueBaseCommand::class ];
运行命令
要在命令行中运行命令,请输入以下内容:php artisan vue-base:create
之后,它将在你配置中指定的位置创建你的目录。你需要将那个目录中的 app.js 文件添加到你的 mix-manifest(或你使用的任何编译器)中,以便使用该组件。
联系我
作者 Dano Gillette