/** * Show the form for creating a new savingproduct * * @return Response */ public function create() { $accounts = Account::all(); $charges = Charge::all(); $currencies = Currency::all(); return View::make('savingproducts.create', compact('accounts', 'charges', 'currencies')); }
/** * @param array|null $params * * @return array An array of the customer's Charges. */ public function charges($params = null) { if (!$params) { $params = array(); } $params['customer'] = $this->id; $charges = Charge::all($params, $this->_opts); return $charges; }
public function create() { $menu = 'registration'; $generations = Generation::all(); $classifications = Classification::where('category', '=', 'Registration')->get(); $locations = Location::where('id', '<>', Auth::user()->location_id)->get(); $employees = Employee::all(); $courses = Course::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('availability', '=', 1)->where('active', '=', 1)->get(); $discounts = Discount::all(); $promotions = Promotion::all(); $vouchers = Voucher::all(); $charges = Charge::all(); $partners = Partner::where('location_id', '=', Auth::user()->location_id)->get(); return View::make('registrations.create', compact('classifications', 'locations', 'employees', 'generations', 'courses', 'charges', 'discounts', 'promotions', 'vouchers', 'partners', 'menu')); }
public function testAll() { self::authorizeFromEnv(); $charges = Charge::all(array('limit' => 3, 'offset' => 10)); $planID = 'gold-' . self::randomString(); self::retrieveOrCreatePlan($planID); $customer = self::createTestCustomer(); $charge = Charge::create(array('amount' => 1000, 'currency' => self::CURRENCY, 'customer' => $customer->id)); $charges_2 = Charge::all(array('customer' => $customer->id)); $this->assertSame(1, count($charges_2['data'])); $this->assertSame($charge->id, $charges_2['data'][0]->id); $charge_2 = Charge::create(array('amount' => 1500, 'currency' => self::CURRENCY, 'customer' => $customer->id)); $charges_3 = Charge::all(array('limit' => 2, 'offset' => 0, 'customer' => $customer->id)); $this->assertSame(2, count($charges_3['data'])); }
public function index() { $charges = Charge::all(); $menu = 'project'; return View::make('charges.index', compact('charges', 'menu')); }
/** * Display a listing of charges * * @return Response */ public function index() { $charges = Charge::all(); return View::make('charges.index', compact('charges')); }