public function get() { return Bills::get(true); }
/** * @param int $userId * @param GetUserPaidBillsRequest $request * @return mixed */ public function getUserPaidBills($userId, GetUserPaidBillsRequest $request) { // Make sure user exists if (!User::where('id', $userId)->count()) { $response = new AjaxResponse(); $response->setFailMessage(trans('users_manager.user_not_found')); return response($response->get())->header('Content-Type', 'application/json'); } return Bills::get(true, $userId); }
public function search(SearchBillsRequest $request) { $config = ['searchTerm' => $request->get('term'), 'page' => $request->get('page')]; return Bills::get($config); }