@JellyBool
刚安装了ide_helper,还是不行。Request 下还是没all方法。
ErrorException in ArticleController.php line 43:
Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context
use Illuminate\Http\Request;修改成
use Request; 后 Request 下面就不提示任何方法了。
这是我引用的空间 @openwrtmail
namespace App\Http\Controllers;
use App\Article;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
1,我用laravel5.0学习,Request 下面好像没有all方法,但是手册上写的是有的,
public function store()
{
$input = Request::all();//我使用PHPstorm没提示all,及时自己写上all 也会报错
Article::create($input);
return redirect('/');
}
2,Article::latest()->get();
模型下面没有latest()->get();
public function index()
{
$articles = Article::latest()->get();
return view('articles.index',compact('articles'));
}
3,$articles = Article::find($id);
模型Article下面没有像手册上写的findOrFail 方法。
请问这些要怎么解决?