Laravel + vue-admin-template 前后端分离项目构建

Skiy 20天前 24

Laravel 是一套简洁、优雅的 PHP Web 开发框架;
https://laravel.com/ 

https://github.com/laravel/laravel

vue-admin-template 是一个后台前端解决方案,它基于 vue 和 element-ui 实现;
https://panjiachen.gitee.io/vue-element-admin-site/
https://github.com/PanJiaChen/vue-element-admin
https://github.com/PanJiaChen/vue-admin-template


================================================================

安装并配置 Laravel:
composer create-project --prefer-dist laravel/laravel laravel-admin
cd laravel-admin/

下载并安装 vue-element-admin:
git clone git@github.com:PanJiaChen/vue-element-admin.git
cd vue-element-admin/
yarn install
yarn build:prod

修改 Laravel 项目的 webpack.mix.js 文件

mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');

改为

mix.copyDirectory('vue-element-admin/dist/static', 'public/static');

mix.copy('vue-element-admin/dist/index.html', 'resources/views/welcome.blade.php');

项目根目录下执行:
yarn install
yarn watch / yarn build:prod
php artisan serve

在浏览器打开:http://localhost:8000

最新回复 (0)
返回
发新帖