Support the ongoing development of Laravel.io →
Input Database Views

Hi!

Is it possible to automatically submit array from a php file to controller without having a submit form?

I am trying to submit data which generated from a jsscript. I wanted to save this data into my database.

My first method was to save the output into a text file then explode this file into my controller where I can submit the data into my database.

This method works fine but I have to change it because of the number of scripts that I am using.

Now my problem is how to submit this data, which is an array to my controller where I can save it to my database. Please help. Thanks in advance!

Last updated 2 years ago.
0

Hi!,

Did you think about the sending data to your controller via ajax ? When your scripts finish data generating you can callback a function to send data via ajax.maybe

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

helmikuu27 helmikuu27 Joined 31 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.