"The model does not exist" when updating "page_model_class"
brynnb opened this issue · 3 comments
Bug report
What I did:
I installed the demo backpack project and followed the instructions to Extend Page.php. After adding 'page_model_class' => 'App/Models/Page',
I got the error message Exception (500) The model does not exist.
. There is definitely an App/Models/Page.php file. I tried pointing it to any of the other models included in the demo installation with the same error. I've also tried Page
and app/Models/Page
and Page::class
and it's not clear to me why this isn't working. Even the example given in CrudPanel of App\Models\Article
does not work.
What I expected to happen:
For PageManager to use my newly created model instead of the existing one in the package
What happened:
Exception (500) The model does not exist.
.
What I've already tried to fix it:
Trying every variation of paths and names and models as the variable
Backpack, Laravel, PHP, DB version:
"backpack/pagemanager": "^1.1",
"laravel/framework": "5.8.*",
To clarify - this is likely not a bug with PageManager, but probably something I'm doing wrong. I figured it was worth posting here because it's more a lack of clarity in the documentation that could use some help. I'd suggest the improvement if I knew what to change to make it work.
I swore I had added this and it still wasn't working, but I believe the issue was likely not including namespace App\Models;
in Page.php. Hopefully someone's future Google search for this problem brings them back here.