$myRequest = new IlluminateHttpRequest();
$myRequest->setMethod('POST'); //default METHOD
$myRequest->request->add(['foo' => 'bar']);
dd($request->foo);
if(request()->isMethod('post')){
//Todo
}
php artisan make:request RequestName
use IlluminateHttpRequest;
public function add_question(Request $request)
{
// Show only GET data
return $request->query(); // DI
}
$request->all() + ['index' => 'value'];