コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Model $objects, $brand_id = 'all', $district_id = 'all')
 {
     $brand = $brand_id;
     $district = $district_id;
     $brands = Brand::all();
     $districts = District::getLocalizedWithCounts();
     $selected_district = District::getLocalizedDistrict($district);
     if (!$selected_district) {
         $selected_district = 'all';
     }
     return view('portfolio', ['categories' => $this->categories, 'objects' => $objects->getLocalizedPaginate(9, $brand, $district), 'brands' => $brands, 'districts' => $districts, 'selected_brand' => $brand, 'selected_district' => $selected_district, 'title' => LANG . '_title']);
 }