搜索整个互联网,发现没有相关内容。
我想从输入<input name="showLimit">
public function index()
{
$showLimit = Input::get('showLimit');
$drivers = Driver::paginate($showLimit);
return view('manage.driver', compact('drivers'));
}
错误:
Class'App \ Http \ Controllers \ Input'not found
答案 0 :(得分:1)
在Request
class上使用依赖注入。
use Illuminate\Http\Request;
public function index(Request $request) {
$showLimit = $request->get('showLimit');
$drivers = Driver::paginate($showLimit);
return view('manage.driver', compact('drivers'));
}
答案 1 :(得分:0)
似乎你有Input
类
$showLimit = Illuminate\Support\Facades\Input::get('showLimit');
$drivers = Driver::paginate($showLimit);
return view('manage.driver', compact('drivers'));