Stars: 553
Forks: 133
Pull Requests: 89
Issues: 26
Watchers: 11
Last Updated: 2023-08-15 16:00:43
Laravel and Nuxt.js boilerplate
License:
Languages: JavaScript, PHP, Vue, CSS, Shell, TypeScript, Blade, Dockerfile
Now supporting Nuxt v3
Examples on using Dark Mode, authentication, and listing data
NUXT v3 front end, a progressive Vue.js framework - For Nuxt v2 visit this branch
Laravel - for our API - v9.40.0
yarn and composer install to install all of your deps.env.example to .env and configure it to your likingsgit clone [email protected]:fumeapp/laranuxt.git; cd laranuxt; yarn; composer install; cp .env.example .env;/resources/yarn dev in one terminal for our nuxt dev setupyarn api (alias for ./artisan serve) in another terminal for our laravel APIApi libraryconst api = useApi()
console.log(api.$user.name); const redirect = await api.login(result)
if (redirect) await router.push({path: redirect})api.loggedIn and the object api.$user <img class="w-8 h-8 rounded-full bg-blue-400" :src="api.$user.avatar" alt="User Avatar">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
api.indexconst users = api.index<models.UserResults>('/user', { page: 1 })api.getconst users = api.get<models.User>('/user/1')api.putconst result = api.put<api.MetapiResponse>('/user/1', user)api.storeconst result = api.store<api.MetApiResponse>('/user', { name: 'Bob', email: '[email protected]' })api.deleteconst result = api.delete<api.MetApiResponse>('/user/1')