Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nathanrobjohn's avatar

Php artisan / call to undefind method

Hi Guys,

I have gone back to a project i was working on 2/3 months ago and when i run php artisan clear-compiled of php artisan optimize i get the following error

call to undefined method Illuminate\view\compilers\bladecompiler::directive

Has anyone else had this problem?

0 likes
3 replies
StuffedGoat's avatar

It's hard to tell because it's to less information. Did other people work along the project whilst you did not? What did you change recently?

I typed in at Google the error message and became several threads displayed form Stackoverflow etc. so you are definitely not alone with this issue.

nathanrobjohn's avatar

No one else was working on the project and thats all the information it gives me also the project was working earlier and all i did was composer update and this issue arised. I seen people saying about a compile.php file but i can't see one in any of my folders not sure whats going on and really bugging me now

nathanrobjohn's avatar
nathanrobjohn
OP
Best Answer
Level 2

@StuffedGoat Found the problem!

I was using dev-master version of the kodeine acl package which now only supports laravel 5.1 due to some blade functions being deprecated. changed kodeine to use v1 and now all working again.

1 like

Please or to participate in this conversation.