Exemplo n.º 1
0
 public function getSpecificTransactions($id)
 {
     $acc_name = Transaction::with('banks')->DefaultApartment()->where('account_id', '=', $id)->first();
     $lists = Transaction::where('account_id', '=', $id)->DefaultApartment()->latest()->paginate(20);
     $accounts = Bankncash::DefaultApartment()->get();
     $last = Transaction::with('banks')->where('account_id', '=', $id)->DefaultApartment()->latest()->first();
     return view('transaction.specifictransactions', compact('lists', 'accounts', 'acc_name', 'last'));
 }
 public function search()
 {
     $type = \Input::get('type');
     $userId = \Input::get('userId');
     $data = Transaction::with('users', 'categories');
     if ($type) {
         $data = $data->where('transaction_type', '=', $type);
     }
     if ($userId) {
         $data = $data->where('user_id', '=', $userId);
     }
     $data = $data->get();
     // $data['ty']=$type;
     // $data['us']=$userId;
     return \Response::json($data);
 }
Exemplo n.º 3
0
 public function getAllTransaction()
 {
     $lists = Transaction::with('banks')->orderBy('created_at', 'DESC')->paginate(20);
     $accounts = Bankncash::all();
     return view('transaction.transactions', compact('lists', 'accounts'));
 }
Exemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $lists = Transaction::with('banks')->where('type', '=', 'Expense')->DefaultApartment()->orderBy('created_at', 'DESC')->paginate(10);
     return view('expense.index', compact('lists'));
 }
Exemplo n.º 5
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $lists = Transaction::with('banks')->where('type', '=', 'Transfer')->DefaultApartment()->latest()->paginate(20);
     return view('transfer.index', compact('lists'));
 }
Exemplo n.º 6
0
 public function getRecentExpenseList()
 {
     $listsexpenses = Transaction::with('banks')->where('type', '=', 'Expense')->DefaultApartment()->orderBy('created_at', 'DESC')->take(5)->get();
     return $listsexpenses;
 }