First and foremost, i'm very green in Laravel. So pls take that into consideration if i use any wrong terminlogy or dont grasp some stuff that should be obvious to you all. I'm trying to populate a dropdown list with the results of database query.
Model for Dropdown Entries:
Class Dropdown {
public static function getFilters() {
$filter = DB::select(DB::raw('SELECT DISTINCT filter AS filt
FROM filter.database'));
return $filter;
}
}
Controller:
class FilterController extends BaseController {
public function getSql_Test() {
$dropdown = Dropdown::getFilters();
return View::make('Dropdown.show', ['Dropdown' =>$dropdown]);
}
}
What my controller accomplishes right now is to display the results of the query (which i want to populate the dropdown) on the page. Can someone pls help me on how to pass this entries onto the select tag here and show it on my View?