This is my Ajax Query This is y Controller And this is the response I get, butI actually want the proper string value that I passed through ajax Answer actually, your script shows proper data what you asking for here your URL looks something like this. because you sending a string instead of a value what you need to do
Tag: laravel-5
Is mass assignment protection needed when properly using validation?
I’ve been using Laravel (5.4) and PHP both for the very first time in a legacy app I’ve been tasked to maintain, and over the past couple of months I have noticed a pain point, which is mass assignment. I believe I have a well-enough grasp of what is is, but I am not sure if I am really utilizing
How to get result from database based on the user with laravel
I started coding laravel and everything was fine till I wanted to get the result based on the user, how to do it, what do I need to do?. Answer You can use where clause. Suppose you wanna fetch all the blogs of a user. like: Or create a relation in User model Then
Relationship eloquent in laravel?
In user: In post: I handle in controller: Then I get an array and the result returned is exactly what I need. But when I query this way because I need to get a lot of data, the result is an empty array. What did I do wrong? In UserController.php: Please give me any comments. Answer You have to select
print days of a special month ? laravel
I need to print only the records for the month of May I get them with the variable I need to see only May results, how do I do it? Answer You can use if condition or
Error Message: “The GET method is not supported for this route. Supported methods: POST”
when i access to endpoint this http://localhost/newsapp_api/public/api/register,this message is showed “The GET method is not supported for this route. Supported methods: POST”. look to the …
PhpSpreadsheet Reader Exception Failed to load /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2RWy7.html as a DOM Document
I have tried everything for resolving this issue but nothing worked. php artisan cache:clear php artisan view:clear php artisan route:clear php artisan config:clear Also Updated my Dependencies …
get value 1 – 2 – 1 – 2 – 1 in for loop php
I am trying to get value like 1-2-1-2-1-2 from for loop I tried code like this $c = count($response[‘video’]); // 2 $currentPage = 2; $k = 1; for ($i=$k; $i <= $currentPage ; $i++) { $b = $i &...
How to display the first image name from a string of image names
This is my array. I want to print the first image name from the key [image_names] [prop] => Array ( [0] => Array ( [id] => 1 …
Laravel, only first element of array passed to route is readable
From a blade template I want to pass an array with a variable amount of values to a route, as described in the answer here. However when I do this I can only ever access the first value in the array I …