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,
Tag: laravel
VueJS InertiaJS Uncaught (in promise) TypeError: Cannot read property ‘search’ of undefined
I’m implementing on Vue JS with Inertia a list where you can filter by name and the component However, when I open the modal, where the component is, I get an error I’ve already hardcoded the search value, like this and the component renders just fine. I’m not getting where the error could be, so any help would be appreciated
Laravel Mix, how to pass variable while mixing?
So I have a JS file that I want to mix and copy and compress using Laravel mix; my webpack.mix.js file looks like so: The thing is that foo.js has a variable called env, set to dev on local envs, and we set it to app on production. Is there a way I can automate this? For example, can I
how to send jquery dynamic data to controller
guys I’m new to jquery as well as javascript. I want to make an application in laravel where I have to add product and their detail dynamically. So I tried Jquery first time. I got Jquery code but now I can’t get how these values pass through the controller So please help me out with this. Thank You This is
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
How to triggter validation in wizard when cliking on Next button?
In Laravel 8 app which uses vuejs and jquery I found wizard made with html like : and inited js function By clicking on “Next” button next step is opened, but I need to validate inputs before moving to next step. Please any hints how can I make validation here ? Also is it some library? I searched in net
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
Laravel edit page does not call CSS and JS when on a server
I made an edit page for my application which is accessible via the index. I have a master.blade.php file that contains all the references for scripting and the CSS links. and every page calls this master page to make use of the Nav bar, heading and the CSS/JS. The edit page does not seem to call this and on the
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