What Does Request Mean ?
When a user requests some pages, what happens? You have just learned that in the previous chapter. We can obtain that request instance and see how it looks. To do that we would like to make a kind of typehinting our ‘Illuminate\Http\Request’ class on our controller constructor or method. Suppose we have a ‘TestController ’.
So the code will look like this:
//code starting
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
class TestController extends Controller
{
protected $request;
/**
* ...