Category : reactjs

I have been working in the Apache directory: /MyComputer/www/projectName/public And I could access my project with: http://127.0.0.1/index.php/index I have several projects that call each other, in order to call them I have changed the Apache directory: /MyComputer/www And now I access my project: http://127.0.0.1/projectName/public/index.php/ But Reactjs doesn’t work, it fails to load the files because ..

Read more

I can’t display Api platform (127.0.0.1:8000/api) view when i have this inside my DefaultController.php : class DefaultController extends AbstractController { /** * @Route("/{reactRouting}", name="home", defaults={"reactRouting": null}) */ public function index() { return $this->render(‘default/index.html.twig’); } But when i remove it i can access /api but i can’t access my route from react (/login etc). Source: Symfony ..

Read more

Iam using react+symfony with webpack. Everything works with simple url eg. one slash in url ("/aboutus","/moodle") but when i try access route with multiple slashes("/admin/users") i get NotFoundResource Error. But with router:matchi will find it. Server log: Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /admin/users"" at /home/rtkpf/Programming/Niners/vendor/symfony/http-kernel/EventListener/RouterListener.php line 136 router:match /admin/users (master) [1]> ..

Read more

I am using react in existing symfony project. I am using the standard authentication system generated by make:auth (Without token). I have installed API platform and I want to retrieve a set of data current. I created a custom controller to do it but, isn’t work This is my custom controller protected $em; protected $security; ..

Read more

I use Symfony5 and React, with docker. Both container are on different docker-compose but on the same newtork, so they can see and ping each other. Now, I’ve installed JWT as the api paltform doc demands: https://api-platform.com/docs/core/jwt/ My security.yml: security: encoders: AppEntityUser: algorithm: auto providers: app_user_provider: entity: class: AppEntityUser property: email firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ ..

Read more