app/Http/Controllers/ExpenseController.php
/**
     * Display a listing of the resource.
     *
     * @return JsonResponse
     */
Display a listing of the resource.
Display a listing of the resource .
public function index()
    {
        $data = Expense::query()
            ->where('branch_id', '=', auth()->user()->branch->branch_id)
            ->orderBy('id','DESC')
            ->paginate(20);
        return Helper::response_with_data($data, false);
    }
public function index ( ) { $ data = Expense :: query ( ) -> where ( 'branch_id' , '=' , auth ( ) -> user ( ) -> branch -> branch_id ) -> orderBy ( 'id' , 'DESC' ) -> paginate ( 20 ) ; return Helper :: response_with_data ( $ data , false ) ; }
Display a listing of the resource.
Display a listing of the resource .