app/Http/Controllers/Member/MemberController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
     */
Display a listing of the resource.
Display a listing of the resource .
public function index()
    {
        try {
            $members = ContactServices::getCustomers();
            if ($members->count() === 0) {
                abort(404, "There are no members found");
            }
            return ContactResource::collection($members);
        } catch (\Exception $exception) {
            return Helper::exceptionJSON($exception, 422, "Members");
        }
    }
public function index ( ) { try { $ members = ContactServices :: getCustomers ( ) ; if ( $ members -> count ( ) === 0 ) { abort ( 404 , " There are no members found " ) ; } return ContactResource :: collection ( $ members ) ; } catch ( \ Exception $ exception ) { return Helper :: exceptionJSON ( $ exception , 422 , " Members " ) ; } }
Display a listing of the resource.
Display a listing of the resource .