skyrpex / laravel-nuxt

Build a SPA with Laravel and Nuxt.
MIT License
123 stars 21 forks source link

Suport for Laravel 6? #8

Closed acacha closed 5 years ago

acacha commented 5 years ago

Hello,

This package doesn't works with new Laravel 6 release.

composer require pallares/laravel-nuxt

Using version ^1.2 for pallares/laravel-nuxt
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v6.0.0
    - Conclusion: don't install laravel/framework v6.0.0
    - pallares/laravel-nuxt 1.2.0 requires laravel/framework 5.5.*|5.6.*|5.7.*|5.8.* -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
    - pallares/laravel-nuxt v1.x-dev requires laravel/framework 5.5.*|5.6.*|5.7.*|5.8.* -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
    - Can only install one of: laravel/framework[5.5.x-dev, v6.0.0].
    - Can only install one of: laravel/framework[5.6.x-dev, v6.0.0].
    - Can only install one of: laravel/framework[5.7.x-dev, v6.0.0].
    - Can only install one of: laravel/framework[5.8.x-dev, v6.0.0].
    - Installation request for laravel/framework (locked at v6.0.0, required as ^6.0) -> satisfiable by laravel/framework[v6.0.0].
    - Installation request for pallares/laravel-nuxt ^1.2 -> satisfiable by pallares/laravel-nuxt[1.2.0, v1.x-dev].

Installation failed, reverting ./composer.json to its original content.
skyrpex commented 5 years ago

Hi! Just published 1.3.0-rc.1. Sadly, I have to time to check if it works... but reading the upgrade guide from Laravel 5.8 to Laravel 6 seems that there was nothing to worry about.

Please, could you try it? I can tag 1.3.0 if someone confirms that it works. Thanks.

max-sysoev commented 5 years ago

I have just tried it on my development server and seems like it works on Laravel 6. It was just 2 pages loading. One with the route gong to nuxt and another one going directly to Laravel. I have also wanted to ask, if it is fine to use this package if I want to have 2 type of rendering: 1 - for frontside (SPA) using nuxt and 2 - for backside(admin) using standart response?

skyrpex commented 5 years ago

Yes, it should be fine. Laravel will render the Nuxt's base HTML page if receives a request to a route that doesn't exist. If the route exists, it'll act normally, so you'll be able to return views from Laravel as well.

skyrpex commented 5 years ago

Since it seems to work, I've pushed the 1.3.0 tag.