我有此鏈接:語法錯誤並不在localhost
和這條路線:
Route::get('/list', '[email protected]');
控制器的方法:
public function list()
{
$users=User::orderBy('district_involved')->get();
return view('list')->with('users',$users);
}
但是,我得到了語法錯誤:
syntax error, unexpected 'list' (T_LIST), expecting identifier (T_STRING)
這適用於本地主機,但不在服務器上。
錯誤消息是否指定語法錯誤所在的文件? –
@RossWilson是在這個確切的方法在控制器。 – Steve
你的意思是你只在生產服務器上得到這個錯誤,而不是在你的本地環境中? – Amarnasan