我一直在尝试在Laravel 4.0 Framework中运行以下控制器。我的控制器有什么问题吗?:
public function results()
{
$query = DB::table('Unions'); // Get the table before applying the where clauses
if (Request::get('Affilation')) {
$Affilation = input::get('Affilation');
if ($Affilation != null) {
$query = $query->where('Affilation', $Affilation);
}
}
if (Request::get('Office_State')) {
$Office_State = input::get('Office_State');
if ($Office_State != null) {
$query = $query->where('Office_State', $Office_State);
}
}
if (Request::has('Local_Name')) {
$Local_Name = input::get('Local_Name');
if ($Local_Name != null) {
$query = $query->where('Local_Name', $Local_Name);
}
}
$results = $query->get(); // Calling get() will execute the query, so it must be last to be called
//show results from union search
return View::make('results')->with('union', $results);
}
答案 0 :(得分:1)
您是否检查了app/storage/laravel.log
以及宅基地VM上的nginx和/或php日志?
Homestead 2(我假设从端口8000)默认使用HHVM,因此在浏览器中显示致命的PHP错误和类似错误。
只是预感,但在你的帖子中你有input::get('Local_name')
。没有input
这样的课程,但有Input
。