Laravel 5.1 has the following classes that seems to share the same name and some have similar behavior.
use App\Http\Requests\Request;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Input;
What are the differences between the Request classes and when should we use each class?
If you look at http://laravel.com/docs/5.1/facades you see that both the Input facade as the Request facade are facades of the class:
Illuminate\Http\Request
The App\Http\Requests\Request you're talking about is the same class. There is one minor difference in the facades for Request and Input. See this post about the exact difference https://stackoverflow.com/a/29961400/1129489
Here is the tl;dr
from the answer at https://stackoverflow.com/a/29961400/1129489
As for my own code base I'm going to use the following convention:
use Illuminate\Http\Request as HttpRequest;
use Illuminate\Support\Facades\Request;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With