I am trying to filter the output of a database query based on other fields in the table. From this, a person would pick their district:
$this->districtList = DB::lists('districts');
Then here, I want to use their district to display all the schools in the district:
$this->schoolList = DB::where('districts', '=', 'some district');
This is great except it gives me a collection with all the information of that record for each school. Can someone help me find the right method, or a way to trim down the output so I only get the school names? I am very new to working with databases and I really appreciate any help.
Last updated