示例#1
0
 public function get_activate($id)
 {
     $item = MerchItem::find($id);
     $item->active = 1;
     $item->save();
     return Redirect::to('rms/merch/items')->with('success', 'Successfully Activated Item');
 }
示例#2
0
 public function get_admin($current = 'current')
 {
     if ($current == 'current') {
         $year = Year::current_year();
     } else {
         $year = Year::find($current);
     }
     if ($year) {
         $orders = MerchOrder::where('year_id', '=', $year->id)->get();
         $items = MerchItem::current_merch();
         $sizes = array('8' => '8', '10' => '10', '12' => '12', '14' => '14', 'XS' => 'XS', 'S' => 'S', 'M' => 'M', 'L' => 'L', 'XL' => 'XL', 'XXL' => 'XXL');
         return View::make('merch.orders.admin')->with('orders', $orders)->with('items', $items)->with('sizes', $sizes)->with('year', $year);
     } else {
         return "Invalid ID";
     }
 }
示例#3
0
 public static function current_merch()
 {
     return MerchItem::where('active', '=', 1)->get();
 }