Laravel-Backpack/MenuCRUD

class CRUD not found in menucrud.php line 18

JadJabbour opened this issue · 2 comments

Bug report

I saw that backpack settings and backpack permissions manager had the same issue any resolution?

What I did:

What I expected to happen:

What happened:

What I've already tried to fix it:

Backpack, Laravel, PHP, DB version:

Just had the same issue when updating to Laravel 5.5. Add this to the aliases in config/app.php:

'CRUD' => Backpack\CRUD\CrudServiceProvider::class,

Huh, that's weird. The alias is actually registered in CrudServiceProvider::register() so this shouldn't be a problem... Thanks for posting the workaround @de-raaf-media .

This might have happened because of Laravel 5.5's package autodiscovery feature (some packages are sometimes discovered before others - in your case MenuCRUD might have been discovered before CRUD for some reason). In the hopes that this was it, I've switched the alias registering to autodiscovery too. Here's the commit on the CRUD dev branch - should be available publicly later this week, after some more testing - Laravel-Backpack/CRUD@0973657

Thanks. Cheers!