LaravelPackages.net
Acme Inc.
Toggle sidebar
zagoruev/laravel-nuxt

Build a SPA with Laravel and Nuxt

142
0
1.3.1
About zagoruev/laravel-nuxt

zagoruev/laravel-nuxt is a Laravel package for build a spa with laravel and nuxt. It currently has 0 GitHub stars and 142 downloads on Packagist (latest version 1.3.1). Install it with composer require zagoruev/laravel-nuxt. Discover more Laravel packages by zagoruev or browse all Laravel packages to compare alternatives.

Last updated

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' => [
      // ...
      Zagoruev\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}',
    '\\'.Zagoruev\LaravelNuxt\Controllers\NuxtController::class
)->where('uri', '.*');

If you want to change Nuxt build location feel free to publish config and edit it:

php artisan vendor:publish --provider="Zagoruev\Lighthouse\LighthouseServiceProvider" --tag=config

Star History Chart