protected function makeRequest($type) {

        if(isset($this->{$type . 'Request'}) && $this->{$type . 'Request'}) {
            $request = app()->make($this->{$type . 'Request'});
            if (!$request instanceof Request) {
                throw new \Exception("Class {$this->{$type . 'Request'}} must be an instance of Illuminate\\Http\\Request");
            }
            return $request;
        }

    }
protected function makeRequest($type) {

        if(isset($this->{$type . 'Request'}) && $this->{$type . 'Request'}) {
            $request = app()->make($this->{$type . 'Request'});
            if (!$request instanceof Request) {
                throw new \Exception("Class {$this->{$type . 'Request'}} must be an instance of Illuminate\\Http\\Request");
            }
            return $request;
        }

    }
protected function makeRequest ( $ type ) { if ( isset ( $ this -> { $ type . 'Request' } ) && $ this -> { $ type . 'Request' } ) { $ request = app ( ) -> make ( $ this -> { $ type . 'Request' } ) ; if ( ! $ request instanceof Request ) { throw new \ Exception ( "Class {$this->{$type . 'Request'}} must be an instance of Illuminate\\Http\\Request" ) ; } return $ request ; } }
Create a FormRequest declared in property type

@param string $type
@return Illuminate\Http\Request | void
Create a FormRequest declared in property type