Category : nuxt.js

Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file) An error occurred while rendering the page. Check developer tools console for details. Sourc..

Read more

After Installing laravel sanctum and setup it with nuxt auth, I get an error of csrf token missmatch. exception: "SymfonyComponentHttpKernelExceptionHttpException" file: "C:xampphtdocslaravel- startervendorlaravelframeworksrcIlluminateFoundationExceptionsHandler.php" line: 372 message: "CSRF token mismatch." the authentication works fine, it’s afterwards wen I want to do a simple post request on registration that does not work and I get the error. ..

Read more

//This is my code //I have a table ‘inventory_transactions(id, part_name, part_number) and transaction_logs(id, description, inventory_transaction_id(FOREIGN KEY))’. I want to insert the value of id to inventory_transaction_id. What should I do? namespace AppHttpControllers; use AppModelsInventory_transaction; use AppModelsTransaction_log; use IlluminateHttpRequest; public function store(Request $request){ $inventory_transaction = $request->validate($this->validation()); $value = Inventory_transaction::create($inventory_transaction); return $this->respondWithMessage(‘Transaction added’); } private function validation() ..

Read more

I have laravel passport based api where i am requesting from my nuxt app with login data and data responding in below format { "status": "success", "token": "MySecret-Token", "user": { "id": 1002, "name": "Shakhwat hossain", "avatar": "https:someimageapi.com/avatar.jpg", "mobile_no": "01834394****", "email": "[email protected]", "area_id": 1, "sub_area_id": 0, } but login not working in nuxt application using nuxt-auth ..

Read more

The data fields like name, address and images are inserting into the database but the problem is that the image doesn’t store to the folder. public function store(Request $request) { $image = $request->file(‘file’); $imageName = time().’.’.$image->extension(); $image->move(public_path(‘images’),$imageName); $vendor = new Vendor(); $vendor->profileimage = $imageName; $vendor->save(); $vendor = $request->validate($this->validation()); $value = Vendor::create($vendor); // if request has ..

Read more

how redirect user after email verification in laravel 8 and nuxtjs ?? email verification code public function verify(Request $request) { auth()->loginUsingId($request->route(‘id’)); if ($request->route(‘id’) != $request->user()->getKey()) { throw new AuthorizationException; } if ($request->user()->hasVerifiedEmail()) { return response([‘message’=>’Already verified’]); // return redirect($this->redirectPath()); } if ($request->user()->markEmailAsVerified()) { event(new Verified($request->user())); } return response([‘message’=>’verified’]); } how redirect user to localhost:3000 ? ..

Read more

I am using Nuxtjs as frontend of my application and Laravel framework as backend. I hosted my application on an Apache Centos server. After running application with pm2 on localhost:3000 I can not get real ip of user in Laravel. My Centos version: Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux ..

Read more

I want to fix the Cors error between Laravel’s jwt and nuxt’s AuthModeule. I deployed Laravel on heroku and Nuxt on netlify, and an error occurred during the login process. Backend (laravel, heroku) logs 2020-11-21T01:23:53.686116+00:00 "OPTIONS /api/login HTTP/1.1" 204 – "https://◯◯.netlify.app/" "Mozilla/5.0 2020-11-21T01:23:53.784655+00:00 "GET /api/posts HTTP/1.1" 200 25 "-" "axios/0.20.0 2020-11-21T01:23:53.790208+00:00 [21/Nov/2020:01:23:53 +0000] "GET /api/users ..

Read more