cretueusebiu/laravel-nuxt
Composer 安装命令:
composer create-project cretueusebiu/laravel-nuxt
包简介
A Laravel-Nuxt starter project template.
README 文档
README
A Laravel-Nuxt starter project template.
Features
- Nuxt 2
- Laravel 8
- SPA or SSR
- Socialite integration
- VueI18n + ESlint + Bootstrap 4 + Font Awesome 5
- Login, register, email verification and password reset
Installation
composer create-project --prefer-dist cretueusebiu/laravel-nuxt- Edit
.envand set your database connection details - (When installed via git clone or download, run
php artisan key:generateandphp artisan jwt:secret) php artisan migratenpm install
Usage
Development
# start Laravel php artisan serve # start Nuxt npm run dev
Access your application at http://localhost:3000.
Production
npm run build
Enable SSR
- Edit
client/nuxt.config.jsand setssr: true - Edit
.envto setAPP_URL=http://api.example.comandCLIENT_URL=http://example.com - Run
npm run buildandnpm run start
Nginx Proxy
For Nginx you can add a proxy using the follwing location block:
server {
location / {
proxy_pass http://http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Process Manager
In production you need a process manager to keep the Node server alive forever:
# install pm2 process manager npm install -g pm2 # startup script pm2 startup # start process pm2 start npm --name "laravel-nuxt" -- run start # save process list pm2 save # list all processes pm2 l
After each deploy you'll need to restart the process:
pm2 restart laravel-nuxt
Make sure to read the Nuxt docs.
Socialite
This project comes with GitHub as an example for Laravel Socialite.
To enable the provider create a new GitHub application and use https://example.com/api/oauth/github/callback as the Authorization callback URL.
Edit .env and set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET with the keys form your GitHub application.
For other providers you may need to set the appropriate keys in config/services.php and redirect url in OAuthController.php.
Email Verification
To enable email verification make sure that your App\User model implements the Illuminate\Contracts\Auth\MustVerifyEmail contract.
Notes
- This project uses router-module, so you have to add the routes manually in
client/router.js. - If you want to separate this in two projects (client and server api), move
package.jsonintoclient/and remove config path option from the scripts section. Also make sure to add the env variables inclient/.env.
Changelog
Please see CHANGELOG for more information what has changed recently.
cretueusebiu/laravel-nuxt 适用场景与选型建议
cretueusebiu/laravel-nuxt 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.27k 次下载、GitHub Stars 达 1.15k, 最近一次更新时间为 2018 年 01 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「SPA」 「vue」 「nuxt」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cretueusebiu/laravel-nuxt 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cretueusebiu/laravel-nuxt 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cretueusebiu/laravel-nuxt 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A component that allows creating responsive HTML tables or lists from data object
Admin panel generator for Laravel 8 and based on Vuetify Admin, a separate SPA admin framework running on top of REST APIs.
Appui DOM Interface
Code generation for MPMG projects that use Laravel and VueJs tecnologies.
Bundle for Symfony 4.4, 5+, 6+ applications with Vuetify
A Laravel-Vue SPA starter project template with Tailwind CSS integration.
统计信息
- 总下载量: 6.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1149
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-10