LoginSignup
9

More than 5 years have passed since last update.

posted at

laravelのRequestのrequest::all();でエラーが出た場合の対処メモ

laravel5のRequestでエラーが出たのでメモ

formの値取得にRequestを使いこのようなエラーが出た場合
Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context

コントローラーの初期で
use Illuminate\Http\Request;

と入っているものを消して

use Request;

とする。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
9