composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
如果需要取消全局配置桩警,執(zhí)行以下命令即可
composer config -g --unset repos.packagist
開始一個laravel-admin項目
第一步:https://learnku.com/docs/laravel/5.7/installation/2242 創(chuàng)建laravel項目
第二步:https://pkg.phpcomposer.com 安裝laravel-admin模塊
官方文檔 :https://laravel-admin.org/docs/zh/1.x
第三步:https://blog.csdn.net/dmguying/article/details/87745283 按照這個教程操作
開始創(chuàng)建控制器
// 創(chuàng)建Model 成功后,會有 migrations 文件生成
php artisan make:model --migration Movies
// 在migrations 里面添加表的字段,然后運行會生成 sql 表
php artisan migrate
// 創(chuàng)建 控制器
php artisan admin:make MoviesController --model='App\Models\Movies'
在Laravel中開發(fā) Vue 頁面
看這個鏈接:
https://segmentfault.com/a/1190000020457104
注意要安裝 vue 等一些東西,注意版本一致。參考下面的配置
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19",
"cross-env": "^7.0",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"resolve-url-loader": "^3.1.0",
"vue-template-compiler": "^2.6.12",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"gulp": "^3.9.1",
"laravel-elixir": "^5.0.0",
"laravel-elixir-vueify": "^1.0.3",
"vue-hot-reload-api": "^2.0.0",
"vueify": "^8.5.4"
},
"dependencies": {
"babel-runtime": "^6.9.2",
"bootstrap-sass": "^3.3.6",
"es6-promise": "^3.2.1",
"vue": "^2.6.12",
"vue-resource": "^0.8.0",
"vue-router": "^3.4.9",
"vuex": "^0.6.3"
}
}
使用Workerman創(chuàng)建Socket服務(wù)器
https://learnku.com/articles/13151/using-laravel-to-carry-out-socket-communication-in-workerman