All Questions
2,883
questions
-1
votes
0
answers
29
views
How to Achieve Newlines in Laravel Endpoint Responses?
In myLaravel endpoint, I'm aiming to incorporate newlines (\n) within myresponse data while adhering to a specific structure. However, the literal \n characters are printing directly instead of ...
0
votes
0
answers
19
views
Sendcloud API-Laravel: malformed utf-8 characters, possibly incorrectly encoded
I am trying to create parcel on Sendcloud and I am getting error for street name with special characters: Moalleöandß xejuana n°41 2°4°.
Malformed utf-8 characters, possibly incorrectly encoded ...
0
votes
0
answers
36
views
Update my Laravel firebase push notifications to Firebase Cloud Messaging API (V1) [closed]
I have this code in my broadcasting folder in laravel framework, since the firebase update cloud messaging i'have to update my code to be able to generate notifications from back end to app confirming ...
0
votes
1
answer
76
views
How can I post array of objects like example
I have a problem with calling an API with Laravel.
I wont to call an api with a request like this (this is an example of json request):
{
"costCenterCode":"CDC-00070964",
&...
-1
votes
1
answer
61
views
Non-null assertions can only be used in TypeScript files.javascript
I've been working on this code base for the past month. And just yesterday, I started facing this problem on a few files. The code is supposed to change the div based on selected options. Here is the ...
0
votes
1
answer
51
views
How to modify a Laravel request when POST data is sent as `null`?
There are times when my front-end clients are sending null as the entirety of a request payload for a POST call:
Unfortunately, this is now causing an issue in my middleware:
JSON content was ...
0
votes
0
answers
74
views
Using ajax and json to fetch data from database in laravel
I want to fetch data from database using json and display the result on a datatable in html using ajax. It was easy to perform the action in php but I'm not sure how its done in Laravel.
This is how ...
-1
votes
1
answer
25
views
Laravel API with postman general error at 1364 Field
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error:
1364 Field 'user_id' doesn't have a default value
(Connection: mysql, SQL: insert into posts (post, updated_at,
created_at) values (...
0
votes
0
answers
86
views
SQLSTATE[22032]: <<Unknown error>>: 3140 Invalid JSON text: "Invalid value." at position 0 in value for column 'products.product_active_matterials'
I got this error while inputing data through form in my laravel project that some column in database having json datatype.
Below are my inputed value
and here is my table structure.
...
0
votes
0
answers
49
views
storing json list/array to MySQL with Laravel 11 api
I'm pretty new to laravel and I'm trying to find a better way to store a json list/array in mysql using the api. This is my current implementation of how I am able to get everything to work but I have ...
1
vote
0
answers
29
views
Laravel Query db table against date value this value may come from json meta->date or may depend on created at
I have some table called services which i store service records. i have a situation where i can add those services from 2 different places [ Reservation , POS ].
table structure for services table is ...
0
votes
0
answers
24
views
Elasticsearch filter. Laravel. Product-Property-Attribute
I have a Product model. He has a relationship with Property.
public function properties(): \Illuminate\Database\Eloquent\Relations\MorphToMany
{
return $this->morphToMany(Property::class, '...
1
vote
2
answers
137
views
Issue with number formatting in Laravel controller
I am working with a Laravel controller where I am restricting the number of decimal places to 2. Here is an example:
$number = 123.456789; // Example number
// Format the number to 2 decimal places
$...
0
votes
0
answers
17
views
Lumen return Double values as string in Json [duplicate]
I'm using Lumen framework with a MySQL database.
I have two columns in my clients table:
name VARCHAR(100) NOT NULL
nb_part DOUBLE NOT NULL
I have one line in my table:
John ; 1.00
When I return ...
0
votes
1
answer
54
views
Laravel Delete record from Ajax Call - Button click event not working
I am trying to delete a record from ajax call in a laravel crud. But the click event seems not working. Therefore delete function is not working. Here is my code.
web.php
Route::delete('/categories/...