Category : nuxt.js

I’m authenticating with Laravel Passport and my front end has been implemented with nuxt. I receive the following 404 error when sending a request with nuxt Auth to Backend: {"message":"","exception":"SymfonyComponentHttpKernelExceptionNotFoundHttpException","file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateRoutingAbstractRouteCollection.php","line":43,"trace":[{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateRoutingRouteCollection.php","line":162,"function":"handleMatchedRoute","class":"IlluminateRoutingAbstractRouteCollection","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateRoutingRouter.php","line":647,"function":"match","class":"IlluminateRoutingRouteCollection","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateRoutingRouter.php","line":636,"function":"findRoute","class":"IlluminateRoutingRouter","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateRoutingRouter.php","line":625,"function":"dispatchToRoute","class":"IlluminateRoutingRouter","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php","line":166,"function":"dispatch","class":"IlluminateRoutingRouter","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":128,"function":"IlluminateFoundationHttp{closure}","class":"IlluminateFoundationHttpKernel","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareTransformsRequest.php","line":21,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareConvertEmptyStringsToNull.php","line":31,"function":"handle","class":"IlluminateFoundationHttpMiddlewareTransformsRequest","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"IlluminateFoundationHttpMiddlewareConvertEmptyStringsToNull","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareTransformsRequest.php","line":21,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareTrimStrings.php","line":40,"function":"handle","class":"IlluminateFoundationHttpMiddlewareTransformsRequest","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"IlluminateFoundationHttpMiddlewareTrimStrings","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareValidatePostSize.php","line":27,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"IlluminateFoundationHttpMiddlewareValidatePostSize","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewarePreventRequestsDuringMaintenance.php","line":86,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"IlluminateFoundationHttpMiddlewarePreventRequestsDuringMaintenance","type":"->"},{"file":"D:temopoapi-testvendorfruitcakelaravel-corssrcHandleCors.php","line":38,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"FruitcakeCorsHandleCors","type":"->"},{"file":"D:temopoapi-testvendorfideloperproxysrcTrustProxies.php","line":57,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":167,"function":"handle","class":"FideloperProxyTrustProxies","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminatePipelinePipeline.php","line":103,"function":"IlluminatePipeline{closure}","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php","line":141,"function":"then","class":"IlluminatePipelinePipeline","type":"->"},{"file":"D:temopoapi-testvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php","line":110,"function":"sendRequestThroughRouter","class":"IlluminateFoundationHttpKernel","type":"->"},{"file":"D:temopoapi-testpublicindex.php","line":52,"function":"handle","class":"IlluminateFoundationHttpKernel","type":"->"},{"file":"D:temopoapi-testserver.php","line":21,"function":"require_once"}]} my nuxt auth and axios config: axios: { baseURL: ‘http://localhost:8000/’, header:{ ‘content-type’:’application/json’ } }, auth: { strategies: { laravelPassport: { provider: ‘laravel/passport’, // Using nuxtAuth ..

Read more

I am currently trying to make an authentification between my Nuxt.js application and my Laravel database / administration. I’m using auth-next and axios with nuxt : <template> <form @submit.prevent="userLogin"> <input v-model="login.username" type="text" class="form-control" placeholder="E-mail" /> <input v-model="login.password" type="password" class="form-control" placeholder="Password" /> <button type="submit" class="btn btn-primary mt-3">Connexion</button> </form> </template> <script> import axios from ‘axios’; export default ..

Read more

I manage to proxy pass my nuxt app. using <Location /test> allow from all Satisfy any ProxyPass http://localhost:3000/ ProxyPassReverse http://localhost:3000/ </Location> my nuxt app is running on rongiroburikik.xyz/test and my laravel api is running on rongiroburikik.xyz/api/public How can I make my nuxt app to run on rongiroburikik.xyz ? without /test? for some reason I cannot ..

Read more

im trying to register user but it not register the user and it not showing any error help me to solve this error im using laravel 8 with sanctum session auth controller validate([ ‘name’ => [‘required’], ’email’ => [‘required’, ’email’ ], ‘password’ => [‘required’ ] ]); User::create([ ‘name’ => $request->name, ’email’ => $request->email, ‘password’ => ..

Read more

Currently I’m working on Nuxt js app that should connect to backend api made in Laravel. The problem is that every request that is sent to the api via axios fails with one of this errors(Depending on the API_URL I use): Error: connect ETIMEDOUT API_URL Error: connect ECONNREFUSED API_URL Example request: axios.get(process.env.API_URL + ‘api/something’) … ..

Read more

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