public function storeCategory($category)
 {
     $all = Product::scopeAllProducts();
     if ($category == 'all') {
         $products = $all;
     } else {
         if (isset($all[$category]) && count($all[$category]) > 0) {
             $products = array($category => $all[$category]);
         } else {
             $products = $all;
             $category = 'all';
         }
     }
     return View::make('store', array('products' => $products, 'category' => $category));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $all = Product::scopeAllProducts();
     return View::make('products.index', array('tires' => $all['tires'], 'rims' => $all['rims']));
 }
 public function showAdmin()
 {
     $all = Product::scopeAllProducts();
     return View::make('admin.index', array('tires' => $all['tires'], 'rims' => $all['rims']));
 }