krayin/laravel-crm · error · Exception
Area must be provided to get menu items.
Error message
Area must be provided to get menu items.
What it means
Error "Area must be provided to get menu items." thrown in krayin/laravel-crm.
Source
Thrown at packages/Webkul/Core/src/Menu.php:67
* @return void
*/
public function __construct(protected CoreConfigRepository $coreConfigRepository) {}
/**
* Add a new menu item.
*/
public function addItem(MenuItem $menuItem): void
{
$this->items[] = $menuItem;
}
/**
* Get all menu items.
*/
public function getItems(?string $area = null, string $key = ''): Collection
{
if (! $area) {
throw new \Exception('Area must be provided to get menu items.');
}
static $items;
if ($items) {
return $items;
}
$configMenu = collect(config("menu.$area"))->map(function ($item) {
return Arr::except([
...$item,
'url' => route($item['route'], $item['params'] ?? []),
], ['params']);
});
switch ($area) {
case self::ADMIN:
$this->configMenu = $configMenuView on GitHub (pinned to 13d6988cda)
When it happens
Trigger: Thrown at packages/Webkul/Core/src/Menu.php:67 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of krayin/laravel-crm@13d6988cda (2026-08-17).
Data as JSON: /api/errors/c28f38eb1efa1185.
Report an issue: GitHub.