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); }
public function getAllTransaction() { $lists = Transaction::with('banks')->orderBy('created_at', 'DESC')->paginate(20); $accounts = Bankncash::all(); return view('transaction.transactions', compact('lists', 'accounts')); }
/** * 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')); }
/** * 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')); }
public function getRecentExpenseList() { $listsexpenses = Transaction::with('banks')->where('type', '=', 'Expense')->DefaultApartment()->orderBy('created_at', 'DESC')->take(5)->get(); return $listsexpenses; }