All Questions
Tagged with laravel-5.4 or laravel-5
60,837 questions
0
votes
0
answers
84
views
Illuminate\Contracts\Container\BindingResolutionException: Target class [admin] does not exist when accessing /admin/users in Laravel with Filament
I’m working on a Laravel 12.17 + Filament v3 project. I installed Filament using:
./vendor/bin/sail artisan filament:install --panels
Then i generated a resource with:
./vendor/bin/sail artisan make:...
1
vote
0
answers
73
views
Allow Cross Origin in Laravel 4.2
I am working on a legacy project which uses Laravel 4.2 for the backend API and angular for the frontend. When I make the login request in local pc I am seeing CORS error in developer tool network tab....
-2
votes
2
answers
109
views
Eloquent query returning null when using a variable
I am having a issue where when i write out a eloquent query using a variable it is returning NULL but if i write out that variable value in text it returns data.
This is my code
$code = 'Test123';
...
0
votes
1
answer
25
views
Using array in where clause IN( ) Laravel
I am trying to use an array in the WHERE clause with IN () in Laravel, but it's not working as expected. Here’s my current code:
$groupOfTopics = [46, 51, 167, 176, 177, 181, 185, 270, 323, 328, 350];
...
0
votes
0
answers
111
views
Laravel Mix error with resolve.extensions when building Fomantic UI
I'm trying to resurrect an older Laravel project (5.8.38) that used Semantic UI for styling the user interface. Since Semantic UI is no longer being developed, I'm also switching to Fomantic UI. I'd ...
1
vote
0
answers
31
views
PHP Laravel AWS RDS Maria DB Conenction Issue
Facing some issue regarding the connectivity of PHP/Laravel application from host machine EC2 to managed AWS RDS Mariadb instance.
When connecting from Laravel app though .env (db settings) it return ...
0
votes
0
answers
20
views
Laravel Custom Auth in registering
I am building Laravel 5.4 and AngularJS to build login rester and logout user. It is not working and I don't know why. I am a beginner to Laravel.
If I send request via remember token then how to ...
0
votes
2
answers
3k
views
Schedule in Laravel 11
We are facing an issue with Laravel scheduled tasks using the call method in Kernel.php not executing as expected in development mode on Windows. When running php artisan schedule:work, it only ...
2
votes
2
answers
56
views
Request for How to Handling if Command in Relationship Handling
Request for How to Handling if Command in Relationship Handling
Hello, good day Artisan,
Please, I need help with an if command not working for a relationship. I want to get the correct relationship ...
0
votes
1
answer
111
views
Why the first call to ::create() method will not set the id field on the model in Laravel?
I use Laravel 5.5 and October CMS 1.0 with MySQL 5.6 database and PHP 7.4.
I have several models with integer autoincrement id keys.
The model's default settings are left intact—I didn't change any of ...
-1
votes
1
answer
88
views
Error “foreach() argument must be of type array|object” in laravel controller
During comments show in the post
Error “foreach() argument must be of type array|object” in laravel controller
The code is as under
Blade File
@foreach($comment->product_images as $image)
<a ...
1
vote
0
answers
47
views
Override Cookie constructor in laravel 5.5 to allow rendering site inside an iFrame
Laravel 5.5 will only accept lax, strict or null as sameSite options when setting a cookie and will throw and exception if it is not one of these - before you ask I am stuck with laravel 5.5 for now.
...
0
votes
1
answer
114
views
Laravel Powergrid Table Add Loading on Pagination
I'm fairly new to Laravel, and I'm using PowerGrid to display an employee table. The skeleton loading works fine when the page initially loads, but I would like to add the loading animation when ...
1
vote
1
answer
88
views
Why are session tokens and form tokens different laravel? [closed]
Why are session tokens and form tokens different in Laravel?
Added to file:
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
protected function tokensMatch($...
0
votes
1
answer
66
views
The bulk download from AWS s3 is failing
This code was working fine until a few days ago. However, we noticed that it is failing exactly after downloading 40 files. I don't remember changing any configuration parameters in the recent past.
...
1
vote
0
answers
103
views
Laravel is sending GET instead of POST request while I am actually using post method
PHP version: 7.4.33
Laravel version: 5.8
when I hit the post route, it shows in the error page that I sent it as Get, and this route supports Post.
this is the error msg: Symfony \ Component \ ...
0
votes
0
answers
77
views
Cant send data to destination page using compact
I've already passed data to the destination page using compact by a method. now I want to pass data to the destination page using compact again. Is there any problem for that? Firstly I tried to use ...
1
vote
0
answers
520
views
How to Send Events to Google Tag Manager via PHP and Guzzle
I'm working on an API in Laravel and need to send events to Google Tag Manager (GTM) using PHP. I've created a helper class to send the event via a Guzzle HTTP call. While I always receive a 200 ...
2
votes
1
answer
64
views
Ajax call is not taking full path without including Project Name
My project is running on an IP where there are other projects too. If I add the full URL in my ajax call then it works fine. Like:-
$.ajax({
headers: {
'X-...
0
votes
0
answers
44
views
Apache virtual host pointing to intermediary document root
I have this fodler structure:
Path to my laravel project:
/home/name/workspace/myProject
Path to my intermediary indexes:
/home/name/workspace/indexes/indexOne
/home/name/workspace/indexes/indexTwo
...
0
votes
1
answer
728
views
Calling a schedule on a function in Laravel console.php
I want to call a function in console.php as a schedule.
Here is my console.php code:
<?php
use App\Http\Controllers\AuctionController;
use Illuminate\Support\Facades\Schedule;
Schedule::call(...
-1
votes
2
answers
737
views
Is Laravel-admin 1.8.19 not compatible with laravel 11.8.0? [Your requirements could not be resolved to an installable set of packages.]
I am using Laravel 11.8.0 for my web application project and wanted to make an admin page. Therefore, I tried to install laravel-admin. However, it gave me an error saying, "Your requirements ...
-3
votes
1
answer
71
views
Couldn't get my desired output and got this kind of error 'htmlspecialchars() expects parameter 1 to be string, array given' [closed]
This is my data.
{"ErrorCode":0,"ErrorDescription":"Success","Data":[{"PluginType":"SMS","Credits":"৳48.959915"}]}
I ...
1
vote
1
answer
725
views
Laravel : I want to rate limit API so only one session per IP address should access the application
Problem statement:- We are running a laravel application and receiving requests from worldwide. We want to rate limit API so only one session per IP address should access the application. Another ...
1
vote
2
answers
8k
views
Method App\Livewire\Post\Comment::emit does not exist
I use the Livewire framework in my Laravel, I created a comment feature, I want when I comment the screen will automatically scroll to the comment via the ID that I inserted using JavaScript but when ...
0
votes
0
answers
39
views
Laravel eloquent select not accepting if function
I simply need to calculate a new field date in select in eloquent... but it does not seems to work although if I copy the mysql query in phpmyadmin it works.
PV_Task::select("*,IF(date_start<'...
0
votes
1
answer
79
views
Laravel When Condition on a column
I have a ModelA with columns: name, last_name, email
I want ModelA with the name Test to add an extra where on email
what I tried is the following
$model_a_res = A::when(
function($query){
return $...
0
votes
1
answer
36
views
Cannot log-in to ReadyKit after changing a migration
After migrating a new column to a data table, midway through my project I became unable to access the users data table use the login functionality of my app that had been working perfectly before. ...
0
votes
1
answer
82
views
How Can I Display Single Image From Array Of Images
Here My Codes That Fetch All Images
@foreach (explode('|', $product->images) as $image) <img style="width:100%" src="/storage/image/{{$image}}"> @endforeach
Only I want To ...
0
votes
0
answers
362
views
Deprecated ReflectionParameter::getClass() Errors After Switching Back to Laravel 5.5 from Laravel 6
After switching from my Laravel 6 branch back to my Laravel 5.5 branch, I'm encountering several deprecation errors related to the ReflectionParameter::getClass() method in my application. The errors ...
1
vote
1
answer
635
views
How to allow a single script in Laravel app, blade page when CSP (Content Security Policy) is enabled?
I run an app developed in Laravel.
I need add a script on a page.blade.php page.
Every script I insert in this page is blocked with the developer console error: "The script loading a resource to ...
0
votes
1
answer
440
views
LARAVEL 5.7 JSONResource toArray ERROR: Declaration should be compatible
I have an problem using JSON Resource to Array converter in Laravel. My code like this:
DataResource.php
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\...
0
votes
0
answers
55
views
php - session seems as like it was never removed, even after using session remove + forget+put null
in my code,
after saving changes in the project
im suppose to clearing the employeNo session
after using a lot of method to make sure the session is cleared
and checking that it is indeed clear
im ...
0
votes
2
answers
724
views
Laravel 5.2 + MySQL 8.0 On RDS - Connection Errors Out With "SQLSTATE[HY000] [2002]"
I have an application that runs on PHP 5.6 and Laravel 5.2. It's hosted in AWS on an AWS Linux 1 EC2 machine. This web server connects to a RDS MySQL instance. The RDS instance has been running ...
0
votes
0
answers
248
views
laravel Auth::logoutOtherDevices() doesn't redirect to login page?
i am using Auth::logoutOtherDevice() in laravel and it logs out user from other sessions but they need to refresh to get to login page . why Doesn't it redirect automatically to login page?
If not ...
0
votes
0
answers
64
views
i need to update url for larval website where i do try htaccess but not working
my current website is
https://example.com/kelimebulucu?harfler=&baslayan=ar&iceren=rt&biten=ma&uzunluk=7 and i need to make it liek
https://example.com/kelimebulucu/{baslayan dynamic ...
-1
votes
1
answer
64
views
Laravel Livewire how to use whereMonth in blade
laravel livewire I'm using whereMonth inside foreach but I'm getting error
error
Method Illuminate\Database\Eloquent\Collection::whereMonth does not exist.
My blade
@foreach ($this->Data as $key=&...
0
votes
1
answer
62
views
How to prevent existing tokens from being revoked when updating Laravel 5 to 7?
I was using Laravel 5.8, which included many unnecessary libraries. Therefore, I decided to create a new project using Laravel 7.30.6 and copied all the necessary files.
Everything seems to work ...
1
vote
1
answer
239
views
Laravel livewire How to merge multiple rows with single row and display result
I'm new for laravel I tried some eloquent collections but not get required result help me to solve.
I have data like this TABLE NAME (attendance):
id | name |student_id | ...
0
votes
2
answers
88
views
Laravel: Nested loop html option and increasing the indent (prefix)
I want to display indented subcategories in the html option tag. I created a recursive iteration in a separate file that I import in a foreach statement.
With the first subcategories, I get a prefix ...
0
votes
2
answers
163
views
How can I execute a function from my navigation menu without using a controller in laravel?
I'm working on a project and I need to be able to execute a function from my app's navigation menu. As far as I understand, all functions are executable from a view using wire:click, and this triggers ...
0
votes
1
answer
434
views
Laravel using MPDF in a Docker container can't find my image urls (due to docker)
Issue: Any URL put in creating a PDF, MPDF can't find it (throws an Exception).
Exception: cURL error: \"Failed to connect to 127.0.0.1 port 8000: Connection refused\"
I have both web and ...
0
votes
1
answer
1k
views
livewire 3 how to store foreach value using form
hello I'm new for livewire 3 I have table inside form, data table having radio button for yes or no
after selecting yes or no I'm going to submit that form that time I want to store fetch detail like ...
0
votes
1
answer
34
views
Laravel 'BelongsToMany' relations always return value in its 'updated' key (even if the record hasn't changed)
I have many-to-many relation between project_media & tag pivot table project_media_tag. It has additional field qty.
I'm doing a syncWithoutDetaching to attach any new / update already existing ...
-1
votes
1
answer
147
views
How to print Api response data as collection
I was trying to print API response data as collection on blade for that i have used following line
$customers = collect(json_decode($response, true));
But whenever i tried to print with following ...
0
votes
1
answer
161
views
Laravel notification via method changes not coming in toMail method
I have one class where I calculate variables in via method and the same variable I want to use in toMail method but it's always null in the toMail Method. any idea why?
class ...
0
votes
1
answer
135
views
Laravel project code not refelcting changes to view files
I created a Laravel (5.1.3) project with breeze as the starter kit. I am planning to use the react as frontend to this project. I run the php artisan serve command. The boiler plate template is ...
-1
votes
1
answer
198
views
Using variables to access object property in blade file of laravel project
Given the following PHP object and variable
$options = { 'options' : { '0' : 'Off' , '1' : 'On' }}
$data->{$row->field}} = 0 or 1
Syntax error method
Why am I not able to access the '0' and '1' ...
0
votes
0
answers
84
views
Get all children categories of a collection of categories without using foreach in Laravel
so I have this codes in my Category model. What it does is, you give it a single category collection and it will return all children category ids of that category in a one dimensional array of ids ...
0
votes
1
answer
44
views
Unable to display data from database on a card using laravel
Even though there are many solutions provided for this error, I am encoutering, I have not find the solution yet, below is the error I am getting when trying to display data from the database on the ...