Laravel 5.4: Non-static method Illuminate\Http\Request::all() should not be called statically のエラー
What?
- Laravel 5.4 で
Non-static method Illuminate\Http\Request::all() should not be called statically
のエラーがでる
Why?
- Request ファサードまで、リクエストが届いていない
config/app.php
に以下のエイリアスが書いてあるので、Request
を直接呼ぶ'Request' => Illuminate\Support\Facades\Request::class,
Solution
- 以下に変更
use Illuminate\Http\Request;
↓
use Request;