Skip to content
Advertisement

Tag: laravel

API: Ajax post in Laravel – 403 (Forbidden)

I’m getting 403 forbidden during ajax call. This is happen only if the ajax is on app.js. If I remove from app.js and put to index.blade.php, is working perfectly. How can I make it working also on my app.js? I’ve searched a lot, and found I needed to add this $.ajaxSetup({ headers: { ‘X-CSRF-TOKEN’: $(‘meta[name=”csrf-token”]’).attr(‘content’) } }); before the ajax,

Want to compare two columns of different table in laravel

I want to compare two columns from two different tables, I have column called “Features” in Model Attrition_correlators and another “Topcorrelators” in Membersdetail. Since I am new to laravel not sure how I can get the value and compare both values. Here is my code: Controller.php I want to compare the data which I am getting $row with the values

Use Laravel route in javascript?

I have a Laravel route returning a JSON, and I have a JS file that dynamically generates a table with the results in a JSON. I just need to use this JSON in my JS table. That’s all. JS code (registroCarros should receive the value from the JSON, route or whatever) My Controller (dbtest is a function in my model

Can’t load popper.js with Laravel Mix

I recently upgraded to bootstrap 5 and my tooltips/popovers in my application stopped working. I have the following error in console: My understanding is that my Laravel Mix / webpack is failing to include popper.js in its compilation? I don’t understand why it is looking for popper.js.map, shouldn’t everything be compiled into a single file (app.js)? In my webpack.mix.js I

How to echo session variable in laravel?

I have created a session variable and it’s value in laravel blade using plane javascript. But when I am trying to get that session variable value in my blade page, it displays nothing . My codes are : Answer I guess you are putting the session variables to the normal php (cookie based) session. But you want to recieve them

Advertisement