PHP Lumen Call to a member function connection() on null
问题 Call to a member function connection() on null is the error I'm receiving when trying to use an Eloquent Model in Lumen. Controller func: /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { $employees = Employee::orderBy('first_name', 'asc')->get(); dd($employees); $response['precontent'] = view('admin::employee.search')->render(); $response['content'] = view('admin::employee.index') ->with(['employees' => $employees]) -