Blade Componentes Doesn't Work Only Production. #38601
Unanswered
devajmeireles
asked this question in
Q&A
Replies: 1 comment
-
Have you tried to invoke the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This case is really intriguing...
Hello community!
I'm a PHP developer and I don't usually ask for much help because from the knowledge I have, I always manage to do well reading the tools' documentation.
I recently migrated to Laravel and in order to take advantage of how good the software I'm building is, I decided to build the system on a VPS and simulate production use.
For that I decided to use Docker, so that the same environment I had in development, I could experiment in production, but I came across a problem which I can't understand why it happens, or how it happens. I will explain in detail:
The system menu of this system was through a component, and to better organize I created a namespace (folder) inside:
App/View/Components/
, looking like this:App/Views/Components/Category/CategoryMenu.php
This

CategoryMenu.php
file has the following structure:... And I invoke this component in the file:
/resources/views/layouts.blade.php
, looking like this:<x-category.categorymenu order="id" direction="asc" limit="6" />
... I also have tried like:
<x-category.categorymenu order="id" direction="asc" limit="6"></x-category.categorymenu>
The component's HTML structure is simple, it's just an organized foreach, so:

The big question:
Why this same component doesn't give any kind of problem in development environment? Considering that the use of the development environment is done in Docker, which in this way replicates THE SAME ENVIRONMENT for the structure in production?
HTML Renderization:
Route access:

/registro
(DEVELOPMENT):WORK'S FINE!
Route access:

/registro
(PRODUCTION):Observations:
Any attempt to code "dd" within:
App/Views/Components/Category/CategoryMenu.php
is ignored and does not kill the code.Laravel creates cache files with user:group:
nobody:nogroup
Sorry this post was long, I wanted to explain in detail.
Does anyone have an idea what this problem might be?
Beta Was this translation helpful? Give feedback.
All reactions