app/Http/Controllers/ExpenseController.php
/**
     * Get Expense list Based On Date Between
     * @param Request $request
     * @return JsonResponse
     */
Get Expense list Based On Date Between
@param Request $request
@return JsonResponse
Get Expense list Based On Date Between @param Request $request @return JsonResponse
public function expenseList(Request $request)
    {
        $start = $request->start_date;
        $end = $request->end_date;
        $data = Expense::query()
            ->where('branch_id', '=', auth()->user()->branch->branch_id)
            ->whereBetween('created_at', [$request->start_date, $request->end_date])
            ->orderBy('id','DESC')
            ->paginate(20);
        return Helper::response_with_data($data, false);
    }
public function expenseList ( Request $ request ) { $ start = $ request -> start_date ; $ end = $ request -> end_date ; $ data = Expense :: query ( ) -> where ( 'branch_id' , '=' , auth ( ) -> user ( ) -> branch -> branch_id ) -> whereBetween ( 'created_at' , [ $ request -> start_date , $ request -> end_date ] ) -> orderBy ( 'id' , 'DESC' ) -> paginate ( 20 ) ; return Helper :: response_with_data ( $ data , false ) ; }
Get Expense list Based On Date Between
 @param Request $request
 @return JsonResponse
Get Expense list Based On Date Between @param Request $request @return JsonResponse