Ikuti petunjuk yang diberikan disini:
╭─yoesoff@yoesoff-ThinkPad-X220 ~/Documents/Oproject/Oapi ‹master*›
╰─➤ composer req cors
+On Your API Platform Server App
-Install nelmio/cors-bundle╭─yoesoff@yoesoff-ThinkPad-X220 ~/Documents/Oproject/Oapi ‹master*›
╰─➤ composer req cors
-vim .env
CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
-vim config/packages/nelmio_cors.yaml
-Clear cache
docker exec -it oapi_oapi_php_fpm_1 php bin/console cache:clear
+Your ReactJS Admin App
- create-react-app Oadmin
- cd Oadmin
- yarn add @api-platform/admin
+vim src/App.js
import React from 'react';
import { HydraAdmin } from '@api-platform/admin';
export default () => <HydraAdmin entrypoint="http://oapi.local:55/"/>; // Replace with your own API entrypoint
+Installed
Comments
Post a Comment