Download the PHP package cretueusebiu/laravel-nuxt without Composer
On this page you can find all versions of the php package cretueusebiu/laravel-nuxt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cretueusebiu/laravel-nuxt
More information about cretueusebiu/laravel-nuxt
Files in cretueusebiu/laravel-nuxt
Package laravel-nuxt
Short Description A Laravel-Nuxt starter project template.
License MIT
Informations about the package laravel-nuxt
Laravel-Nuxt
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
.env
and set your database connection details - (When installed via git clone or download, run
php artisan key:generate
andphp artisan jwt:secret
) php artisan migrate
npm install
Usage
Development
Access your application at http://localhost:3000
.
Production
Enable SSR
- Edit
client/nuxt.config.js
and setssr: true
- Edit
.env
to setAPP_URL=http://api.example.com
andCLIENT_URL=http://example.com
- Run
npm run build
andnpm run start
Nginx Proxy
For Nginx you can add a proxy using the follwing location block:
Process Manager
In production you need a process manager to keep the Node server alive forever:
After each deploy you'll need to restart the process:
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.json
intoclient/
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.
All versions of laravel-nuxt with dependencies
fideloper/proxy Version ^4.4
fruitcake/laravel-cors Version ^2.0
guzzlehttp/guzzle Version ^7.0.1
laravel/framework Version ^8.12
laravel/socialite Version ^5.0
laravel/tinker Version ^2.5
laravel/ui Version ^3.0
tymon/jwt-auth Version ^1.0.1