pallares/laravel-nuxt 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pallares/laravel-nuxt

最新稳定版本:1.5.0

Composer 安装命令:

composer require pallares/laravel-nuxt

包简介

Build a SPA with Laravel and Nuxt

README 文档

README

laravel-nuxt was created to offer some sugar when working locally with Laravel+Nuxt, solving some cookie problems in the process. Today, it isn't necessary anymore.

We recommend using Laravel Sanctum, which plays nicely with SPAs (see Sanctum's SPA Authentication section). If you can't migrate, just keep using laravel-nuxt.

Laravel Nuxt

This package allows you to build a SPA with Laravel and Nuxt.

Installation

composer require pallares/laravel-nuxt

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:

return [ // ... 'providers' => [ // ... Pallares\LaravelNuxt\LaravelNuxtServiceProvider::class, ], ];

You need to add a fallback route that will render the SPA page in routes/web.php file:

// ... // Add this route the last, so it doesn't interfere with your other routes. Route::get( '{uri}', '\\'.Pallares\LaravelNuxt\Controllers\NuxtController::class )->where('uri', '.*');

Finally, you must install the laravel-nuxt npm package. After following the instructions, run npm run build and try your SPA!

统计信息

  • 总下载量: 63.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 125
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 123
  • Watchers: 3
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固