Home

Awesome

<p align="center"> <img src="https://raw.githubusercontent.com/fumeapp/laranuxt/main/resources/laranuxt.png" width="200" /> </p>

Laravel + Nuxt.js Boilerplate

Now supporting Nuxt v3

Are you using Laravel with vapor? want your Nuxt setup on lambda as well? TRY FUME!

MadeWithLaravel shield

Test PHP Lint Javascript Lint PHP

Examples on using Dark Mode, authentication, and listing data

What is included

Installation

git clone git@github.com:fumeapp/laranuxt.git; cd laranuxt; pnpm i; composer install; cp .env.example .env;

Local Environment

Api and Authentication

const api = useApi()
console.log(api.$user.name);

Authentication

  const redirect = await api.login(result)
  if (redirect) await router.push({path: redirect})
  <img class="w-8 h-8 rounded-full bg-blue-400" :src="api.$user.avatar" alt="User Avatar">

API

The API class provides helper functions to easily retrieve, update, and remove data from your Laravel endpoints. If you use and update modeltyper regularly you will always have completely typed results

const users = api.index<models.UserResults>('/user', { page: 1 })
const users = api.get<models.User>('/user/1')
const result = api.put<api.MetapiResponse>('/user/1', user)
const result = api.store<api.MetApiResponse>('/user', { name: 'Bob', email: 'bob@mail.com' })
const result = api.delete<api.MetApiResponse>('/user/1')