[WIP] Setup of skeleton

This commit is contained in:
Ludovic CANDELLIER
2020-03-25 00:08:27 +01:00
parent baf8e13c25
commit 36267139a1
377 changed files with 18248 additions and 26 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Repositories\Core\Menu;
use Lavary\Menu\Menu as LavaryMenu;
use View;
class Menu extends LavaryMenu
{
public function make($name, $callback)
{
if (is_callable($callback)) {
if (!array_key_exists($name, $this->menu)) {
$this->menu[$name] = new Builder($name, $this->loadConf($name));
}
// Registering the items
call_user_func($callback, $this->menu[$name]);
// Storing each menu instance in the collection
$this->collection->put($name, $this->menu[$name]);
// Make the instance available in all views
View::share($name, $this->menu[$name]);
return $this->menu[$name];
}
}
}