1 public function store(Request $request)
2 {
3 $name = $request->input('name');
4
5 //
6 }
1$myRequest = new \Illuminate\Http\Request();
2$myRequest->setMethod('POST'); //default METHOD
3$myRequest->request->add(['foo' => 'bar']);
4dd($request->foo);
1<?php
2
3namespace App\Http\Controllers;
4
5use Illuminate\Http\Request;
6
7class UserController extends Controller
8{
9 /**
10 * Store a new user.
11 *
12 * @param \Illuminate\Http\Request $request
13 * @return \Illuminate\Http\Response
14 */
15 public function store(Request $request)
16 {
17 $name = $request->input('name');
18
19 //
20 }
21}