Evgeniy Miroshnichenko
Evgeniy Miroshnichenko

Reputation: 1865

Laravel dosen't see path to file with Custom Request Class, how to fix it?

I created Custom ReadRequest Class. Than I created folder with "Order" name in Requests folder, and put there my ReadRequest.php file:

enter image description here

After this manipulation Laravel doesn't see this file in my Controller:

enter image description here

How can I fix that?

Upvotes: 0

Views: 164

Answers (1)

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111829

You haven't written how you know that Laravel doesn't see this file but looking at your screen it seems your IDE doesn't see it it either. So make sure in your ReadRequest.php file you have

<?php

namespace App\Http\Requests\Order;

class ReadRequest
{
  // ...
}

It's very possible that you have invalid classname in this file or invalid namespace, so your IDE shows you the error and also composer cannot load the file.

Upvotes: 1

Related Questions