All Questions
2,903 questions
0
votes
1
answer
48
views
I am getting array data from api response. I want to save this data to my database using laravel
Here is the response data
array:3 [▼ // app\Http\Controllers\DataSend.php:38
"status" => 200
"message" => "Consignment has been created successfully."
"...
1
vote
1
answer
68
views
How do I send a http post request with an array as a post parameter in laravel
I am trying to send a post request in laravel. Below is my code:
$response = Http::withToken($local_signature)
->post('myUrl', [
"amount" => $amount,
"...
0
votes
1
answer
66
views
Submit Form as array with Inertia in React
Please I am developing an application with React JS, Inertia and Laravel that require users to submit their academic qualifications. I want the user to be able to add additional form row for more ...
1
vote
0
answers
22
views
Meta data omitted when adding data object to array - Laravel
I have the following function in Laravel :
public static function foo($data)
{
if (gettype($data) === 'array')
$data = (object)$data;
return $data;
}
That prints the following data:
{...
0
votes
0
answers
39
views
Report back validation errors an array of inputs with FormRequest in Laravel
I have a page where I want a teacher to list the grade for each student on a project as one large form. I have the form working via a large array as shown. It is created with a foreach loop with a ...
0
votes
1
answer
45
views
trying to pass array in the view with error in the third
service one and two I can receive in the view but the third gives an error
Controller:
$servicos1 = DB::select("select * from servicos WHERE categoria = 1 ORDER BY servico DESC");
$...
0
votes
1
answer
185
views
Javascript dont enter if statement when its true
I'm trying to make online version of Windows XP, and I'm currently on making moving multiple selected apps on desktop grid and I encounter some error in my functions' logic however I do not know why ...
0
votes
0
answers
65
views
Query data from one table when a condition from another table is met
Currently I have a project in laravel but my programmer partner has disappeared and he is the one who is in charge of the heavy work, because I am less experienced.
I have a problem with a view, I ...
1
vote
1
answer
71
views
Indirect modification of overloaded property laravel
Indirect modification of overloaded property Modules\Product\Http\Requests\CreateProductRequest::$specification has no effect
foreach($request->specification as $key => $specification){
...
1
vote
1
answer
57
views
how to use string to be key of array in php
I have array that need to call.
$array['first_key']['second_key'] = 'value';
$keys = "['first_key']['second_key']";
I want to call it $array.$key that like $array['first_key']['second_key'].
...
-1
votes
1
answer
750
views
I keep getting this error "Cannot access offset of type string on string" whenever I try to serve dummy data to my Laravel application [closed]
I am trying to serve some data to my view. However, when i try to access the elements in my dummy array, i keep getting an error "Cannot access offset of type string on string". And I don't ...
0
votes
0
answers
63
views
Push entries into a result array from deepest nested loop, but also push an entry when deepest loop is not reached
I am creating an array for an order to then pass this data to stripe, the array has multiple forEach clauses.
The issue I am facing is, if the order item(s) does not have menu_options it is not ...
0
votes
1
answer
30
views
Laravel Append 'lat' and 'lng' keys to associative array
I have a json column in MySQL table that contains data of this sample:
[
[
-79.4936969567481,
37.3504643767627
],
[
-79.4936969567481,
37.3504643767627
]...
-1
votes
1
answer
58
views
Reduce a multidimensional array of unknown depth to an indexed array with associative rows
I have a multidimensional array with indeterminant depth and need to reduce it to a 2d array (an indexed array of associative rows).
array:5 [▼
0 => array:3 [▼
"id" => 2
&...
0
votes
1
answer
58
views
Make Load More With Javascript Fetch in Laravel
Can u guys help me how to create load more with my javascript
and this is my javascript for fetch API resource
<script type="text/javascript">
const filterProduct = document....