Пример #1
0
 /**
  * @before _secure, memberLayout
  */
 public function subscriptions()
 {
     $this->seo(array("title" => "Subscriptions", "keywords" => "admin", "description" => "admin", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $subscriptions = Subscription::all(array("user_id = ?" => $this->user->id), array("item_id", "created", "expiry"));
     $transactions = Transaction::all(array("user_id = ?" => $this->user->id), array("property", "property_id", "payment_id", "amount", "created"), "created", "desc");
     $view->set("subs", $subscriptions);
     $view->set("transactions", $transactions);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $transactions = Transaction::orderBy('date_purchased', 'desc')->orderBy('created_at', 'desc')->take(10)->get();
     $total_spent = Transaction::all()->sum('amount');
     //pull n_total and i_total
     $n_total = User::where('firstname', '=', 'Nathanael')->first()->transactions->sum('amount');
     $i_total = User::where('firstname', '=', 'IndiAna')->first()->transactions->sum('amount');
     $i_diff = $i_total - $total_spent / 2;
     $n_diff = $n_total - $total_spent / 2;
     return View::make('transactions.index')->with('transactions', $transactions->reverse())->with('total_spent', $total_spent)->with('n_total', $n_total)->with('i_total', $i_total)->with('i_diff', $i_diff)->with('n_diff', $n_diff);
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  * This route will be called automatically on a GET on the base path
  *
  * @return Response
  */
 public function index()
 {
     $transactions = Transaction::all();
     return Response::json($transactions);
 }
Пример #4
0
 /**
  * Display the specified resource.
  * GET /transactions/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     return Transaction::all();
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $transactions = $this->transaction->all();
     return View::make('admin.transactions.index', compact('transactions'));
 }
Пример #6
0
 /**
  * @before _secure, _admin
  */
 public function transactions()
 {
     $this->seo(array("title" => "Transactions", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $page = RequestMethods::get("page", $page);
     $limit = RequestMethods::get("limit", $limit);
     $transactions = Transaction::all(array(), array("user_id", "property", "property_id", "payment_id", "amount", "created"), "created", "desc", $limit, $page);
     $view->set("transactions", $transactions);
     $view->set("page", $page);
     $view->set("limit", $limit);
     $view->set("count", Transaction::count());
 }