I am trying to crud the image but it say undefined variable reimage code: CategoryController } web.php add.blade.php ** and I am trying to make new name for the photo as the name is time+the orginal name ml> and I am trying to make new name for the photo as the name is time+the orginal name ml> and I am
Tag: laravel
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
How to group array by key in PHP Laravel Builder query
I am new Laravel and I just want to group my array by key. Here’s what I have done so far: Code: Return Value: I just want something like this: I tried foreach to $vehicles variable but it says Cannot use object of type stdClass as array is there any way to achieve this? thanks in advance. Have a good
Laravel migrations won’t apply on MySQL (InnoDB)
Hello everyone, This is my first time posting ! I am running into a problem when applying laravel 8 migrations on my new web server. While trying to deploy my projet I’m unable to apply migrations and I’m not sure why. Below images of the error and my migration, i’m using the php artisan migrate –seed command Outputed message when
api versioning page not found
I’m trying to create my 1st API on Laravel 8, and want to create versioning that would look like this My user controller looks like this in my config/app.php i have this ‘api_latest’ => ‘1’, in my middleware (appHttpMiddlewareAPIVersion.php) in my kernal (app/http/kernel.php) in my /app/Providers/RouteServiceProvider.php and in my routes/api_v1.php i have this I’m getting a 404 error when i
Laravel update all users age by x
I want to update all users in my database with an age value which I get from my request. How do I manage this? I somehow need the current value in the db and multiple it. Answer Let’s assume that the name of the field in your $request is multiple, you can iterate over your customer records and update each
How to toggle a boolean value with livewire and checkboxes
I am trying to create this filter thing with check boxes. I am trying to toggle the state of the check boxes to be true or false When I do this approach, I am not sure how to make the inverse work, so if it is unchecked It would be false. Is there a way to add something to this,
Should you leave the Laravel debug bar on a published site?
New to using Laravel and php. I’m working on a project, and there’s a debug bar on the bottom of a published web app. Is this standard? Or should I tell my manager to remove it? Is there any security issues? .env is currently: Answer Yes, it is a security concern. The debug bar should only be available to the
What causes the user access error in this Laravel 8 application?
I have made a Laravel 8 application (link to GitHub repo) that requires user registration and login. I am currently working on adding user roles and permissions. I have 3 roles (types of users): Admin, Author, and Member. Each type of user should have access to a section of the dashboard. The users table: The roles table: In routesweb.php I
Login with username or email Laravel fortify fails validation
I’m new to laravel, I’m creating a login system where a user can login with username or email. When I submit the form, it returns with an error The username field is required. LoginRequest.php FortifyServiceprovider.php Fortify.php login.blade.php Please any help would be appreciated. thanks Answer Add name attribute to both input fields username and password login.blade.php