intelephense(P1006) #1302
-
I've this code working fine but with validation error, how ca i fix it ? ![]() Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Based on the information provided in the knowledge sources, it appears that you're encountering a validation error with Intelephense in your Backpack code. This issue is likely related to the static method calls on the CRUD facade. To resolve this, you can try the following:
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
// Instead of:
CRUD::column('name');
// Use:
$this->crud->column('name'); This approach is mentioned in the Github issue #4772. If these steps don't resolve your issue, it would be helpful to see the specific code causing the error. The knowledge sources don't provide enough information to address all possible Intelephense validation errors in Backpack. Remember, this Intelephense warning doesn't necessarily mean your code isn't working correctly. It's more of a static analysis issue related to how Intelephense interprets the CRUD facade calls. ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️ Relevant sources: Update Operation|Validating fields using field attributes |
Beta Was this translation helpful? Give feedback.
-
wrong answer.. |
Beta Was this translation helpful? Give feedback.
-
Some human help? |
Beta Was this translation helpful? Give feedback.
-
Hello @blondie63 I have not so much experience about this kind of validation extension, I will ask @pxpm to help us in this case. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Hey @blondie63 , You might want to try Seems to me like the problem isn't Backpack-related, so I'll close this. Hope it helps. Cheers! |
Beta Was this translation helpful? Give feedback.
Hey @blondie63 ,
You might want to try
CRUD::model()
instead. Or if you're inside a closure, to make sure you use $crud in that closure.Seems to me like the problem isn't Backpack-related, so I'll close this. Hope it helps.
Cheers!