How can I get my custom gate working in Laravel?

I am trying to create a custom gate that allows users of the “Administrator” team to access the Users index page. However, it functions exactly the opposite of what I want to achieve and I …

Custom verificarion email in laravel issue

guys in my laravel application i’m trying to send my users a custom verification email, as i’m using language translations So as the first step I’ve created following custom email template in my App/…

Review code to prevent allowed memory limit issue

While this may seem to be the right thing to do, I feel my code is very bad. I’m running my Laravel 6.x app in a Docker container. When running the code below, I get Allowed memory size of ** bytes …

How do I do Laravel form validation when value of one field decides validity of the other field

I have a form. Type field is a drop-down and has only two possible values. Second field is bcode. E.g. if table has data like- ID TYPE BCODE 1 1 2 2 1 3 3 2 2 4 1 4 5 …

Laravel – Avoiding double-booking time slots

I am trying to figure out how I would add some form of validation so that the same theatre slot cannot be booked twice on the same date. Any advice is much appreciated. The code below is how to crete …

ArgumentCountError Too few arguments to function 0 passed and exactly 1 expected in Laravel

I’m trying to update a record in my laravel application In my app management blade I have a link to a single record

laravel 6 login successfully but redirect to login page

My environment is MAMP server on MACOS. LoginController.php public function authenticate(Request $request) { $this->validate($request, [ ’email’ => ‘required|email’, …

Select field Old value cannot be displayed in laravel

I’m having a user registration form with a select field, When ever I get an error on the form user redirected to the form and display the previously entered values I able to display old values for …

How to know the controller and method name inside blade file in Laravel 6?

I am new to Laravel. I was practicing setting up a blog in Laravel 6. I have a layout.blade.php file where all the basic HTML is written. In the content section of the layout.blade file, I want to @…

What is the difference between a JsonResource & ResourceCollection? in Laravel v6 or v7

Can someone explain the difference between a ResourceCollection and JsonResource? In Laravel 6 docs you can generate 2 different types of resources… ResourceCollection and JsonResource. https://…