I wanted to change my collection set to a new variable, but it changed the original. I thought this was a JavaScript issue and PHP was referring to value. How do I set my collection to a new variable, which I can alter without changing the original collection. I’m using this workaround for now: Answer T…
Tag: laravel-8
How can I access variables displayed with dd( ) of Laravel?
I need to access to this id here is the code I used to displayed with dd() What I need is to get the variable I mentioned in the picture below, so I can delete the uploaded file with its own id so far I tried : but it doens’t work, it gives me this Error What should I do
Laravel 8: Symbolic Link not appearing in public
I have a problem with symlink. after I run this command php artisan storage:link the uploaded images are showing in the public and storage folder. I can display my img by using this code but after a day the shortcut of the images folder in public has gone and when I run the php artisan storage:link it says it…
Laravel 8: How to validate entering dimensions
I have a form and there is a field in this form called dimensions and users MUST enter a value like this: 10x10x10 So I am separating length, width and height by x. But now I don’t know how to make this validation with Laravel: So the question is: How can I force users to separate each dimensions by wri…
How to redirect a user to different dashboards based on a level field in the ”’users”’ table in Laravel Breeze?
Please forgive me if my question is too generic but I am at my wits end. I have a users table with a level field as shown given below: $table->unsignedSmallInteger(‘level’)->after(‘password’); I want to redirect the user to different dashboards based on the value of the level fie…
Unique validation with 2 columns – Laravel 8.x
I’ve been trying make my validation so that an extension must be unique to it’s own company but not to other companies. Here is my DB table: And my validation rule looks like this: But still I got errors saying that the extension number is already taken. It seems that the Unique rule doesn’t…
Laravel does not show all the available results from table
I am working with Laravel 8 to develop online ordering project and in this project, I want to show all the orders from orders table if the status of each order is set to awaiting, so here is my code: But now the problem is, it only shows the first result from table, however there are more than one record
The second dropdown value for multiple dropdown value NOT SAVE in database using laravel
Hye everyone! First of all, my coding all about dynamic dropdown value, the issues now is the second dropdown value is not save inside the database. Which part did I missed or wrong? View:- View for second dropdown using jquery script:- Controller:- Routes:- Answer The issue is with option value wrongly passe…
Laravel 8 – Base table or view not found: 1146 Table ‘laravel8.brand’ doesn’t exist
I’ve been searching the web for quite a long time and I have tried adding the protected $table = “brands”; to my Brand Model as seen here: Then on my controller I have the following code: Passing this through my routes: Which I also used on my form inside views/admin/brand folder: My databas…
What is the cause of this route-related error in my Laravel 8 application?
I am working on a Laravel application that requires user registration and login. Alter registration, the users have the possibility to replace the default avatar image with a picture of their choice. They should also be able to delete this picture and revert to the default avatar (default.png). For this purpo…