Illuminate\Http\Request::get() should not be called statically
其实不只是get方法,all()等方法都不能被静态调用
原因如下:
all());
}
```
4、和第三种方法用法一样,不过是直接写在构造方法里面的
```
use Illuminate\Http\Request;
class YourController extends Controller
{
protected $request;
public function __construct(Request $request)
{
$this->request = $request;
}
public function sign_up_user(Request $request){
dd($this->request->all());
}
}
```