December 2016
Beginner
189 pages
3h 5m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Laravel, 10.1007/978-1-4842-2538-7_18
Sanjib Sinha1
(1)Howrah, West Bengal, India
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;/*** ...
Read now
Unlock full access