vuejs #import not working - laravel

Unexpected token import.
While importing vue-form in VueJS with Laravel 5.4 project.
Getting stuck to use vue-form with Laravel.
using this Repository
https://github.com/fergaldoyle/vue-form
Thanks in Advance.

You're probably using this line import VueForm from 'vue-form';
You'll need webpack + babel (or any other module bundler + ES6 compiler).
If you're not using a module bundler you can use the VueForm global which is created.

Related

Issues trying to generate quasar client with API platform

So I have created a quasar application and generated the front end using create-client —generator quasar and the options mentioned in the api-platform quasar client docs.
The problem appears when I try to import the route files generated from the create-client command. The js files are imported correctly, but any vue fails to load until I go into the generated files and add .vue to each import statement. Am I missing a step here?
Tried : importing generated Vue components
Expected : routes to work
Result: unable to load imports without .vue extension

Cannot generate ApiDoc assets in Laravel 9

I'm new to laravel and I'm having some issues in generating an api documentation (SwaggerAPI, OpenAPI, Postman, whatever it works). I am upgrading a laravel application and got stuck got a few things I need to do solve with the latest version (9.x)
I've followed the steps installing the most popular libraries but I failed getting and error because of lumen is a higher version that is not supported. I also cannot run artistan vendor because it seems not working in Laravel 9 neither.
I've tested the following libraries and they didn't run in Laravel 9:
L5 Swagger
laravel-apidoc-generator
Laravelista and Vendor
Can anyone help me?

Find exact value of VUE_APP_API_BASE_URL for laravel project

I have a laravel + Vue.js project template downloaded from Creative Tim. Its login and register is not proceeding, giving the catch error whereas in the template demo its working fine. I think so the instructions said to write the VUE_APP_API_BASE_URL in Vue .env file and I didn't wrote it correct. Can anyone pls tell me how can I locate the exact address and what syntax it would be?
Since you are using vue with laravel, you need to prefix MIX_ before the variable. Eg:
MIX_VUE_APP_API_BASE_URL=http://localhost:8000
Here is the reference: https://laravel.com/docs/8.x/mix#environment-variables

Errors while doing vue add vuetify(vue3 preview)

I tried to start a vue3 project with vuecli, but when I add vuetify, errors occurred while everything is normal when used vue2. It says
Error: You cannot call "get" on a collection with no paths. Instead,
check the "length" property first to verify at least 1 path exists.
someone has the same problem, need some solution, thank you.
In this link https://vuetifyjs.com/en/getting-started/installation/
Vuetify says:
The current version of Vuetify does not support Vue 3. Support for Vue 3 will come with the release of Vuetify v3. When creating a new project, please ensure you selected Vue 2 from the Vue CLI prompts, or that you are installing to an existing Vue 2 project.
Add the following to main.js. It would solve the problem
new Vue({
router,
store,
vuetify,
render: h => h(App)
}).$mount("#app");
vue3 is giving this error because vue3 is in beta version if you use vue2 you solve your problem. My error is solved by this solution.
Just try with the vue2 version as creating vue instance. I got the same error too and vue2 prevented the error.
If you want to used 'Vue-3 + Vuetify' exclude TypeScript Later you can include when you finished initializing and added 'vue add vuetify'.
Vue create
use vue version 2
after installation run vue add vuetify
error solve
Just choose Vuetify 3 if you are using Vue 3:
When prompted, Choose Vuetify 3 Preview (Vuetify 3)

Namespacing in Laravel Spark install

I am trying to install Laravel Spark into an existing app. I have not changed the default namespace of "App".
I get the following error on install:
Class 'Laravel\Spark\Providers\SparkServiceProvider' not found
How can get around this error?
It means you didnt attach a class for laravel to detect it ..
Go to App/Config..open app.php..
scroll down.. youll see a providers list.. add a new line to it like
Laravel\Spark\Providers\SparkServiceProvider::class,
Save and Try again :)

Resources