Best design pattern to create navigation based on whether other classes/packages are available (PHP / Laravel) -
we're building new cms our company using laravel.
to maintaining code have decided make commonly used pieces of functionality different packages. e.g. blog package, gallery package etc...
what i'd ideally admin area able find installed packages of type , build navigation based on provide.
what's best way of accomplishing goal - there way of making installed packages register admin package? don't want admin package have go looking other packages.
all ideas appreciated.
make registration class, make ->registernavigation($controller, $text) item, in sub-packages' service provider ::boot() functions call registernavigation method sub-packages registered in order they're listed in laravel's service providers. of course, have complex or simple you'd like. :)
Comments
Post a Comment