-
(IDK if this is the right place to ask this, or if I should have opened an Issue, but here I am 😅) Hi everyone, I am trying to implement a new page, called "Procedures", and this comes obviously with many Views and other stuff. So, the problem is, when i go to the [IP-address]/procedures page, everything seems to work fine, except for the fact that the table shows the "no matching results found" text instead of loading the results from the db table; which is strange, since when I load a new record via the
Here is the new code I added: PROCEDURE OBJECT app/models/Procedure.php (BRAND NEW)
/resources/views/procedures/index.blade.php (BRAND NEW)
/resources/views/procedures/edit.blade.php (BRAND NEW)
CODE ADDED TO routes/api.php
CODE ADDED TO routes/web.php
STANDARD CONTROLLER - /app/Http/Controllers/ProceduresController.php (BRAND NEW)
API CONTROLLER - /app/Http/Controllers/Api/ProceduresController.php (BRAND NEW)
TRANSFORMER - /app/Http/Transformers/ProceduresTransformer.php (BRAND NEW)
For what i've seen, it seems to have some problems in the index method of /app/Http/Controllers/Api/ProceduresController.php, but i don't understand what and where it may be. My hypotesis at this point is that i'm missing some routes/references to the db, but i'm not sure about that. Can someone help me? Am I missing something? Did I forget to add some routes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Gave a look at the storage/logs/laravel.log file and figured out what was breaking my code.
Turns out there was a wrong import:
While the import was pointing to ProceduresTransformer.php, as it's showed in the image, i named the actual file as ProcedureTransformer.php so obviously the file wasn't being found. After renaming the file the file everything worked fine: