PHP code example of tripteki / laravelphp-setting-menu
1. Go to this page and download the library: Download tripteki/laravelphp-setting-menu library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tripteki / laravelphp-setting-menu example snippets
use Tripteki\SettingMenu\Contracts\Repository\Admin\ISettingMenuDetailRepository;
use Tripteki\SettingMenu\Contracts\Repository\ISettingMenuRepository;
$menuRepository = app(ISettingMenuDetailRepository::class);
// $menuRepository->create("headernavbar", "home", [ "category" => null, "icon" => "md-home", "title" => "Home", "description" => "Home Page", ]); //
// $menuRepository->delete("headernavbar", "home"); //
// $menuRepository->update("headernavbar", "home", [ "icon" => "fa-home", ]); //
// $menuRepository->get("headernavbar", "home"); //
// $menuRepository->all("headernavbar"); //
$repository = app(ISettingMenuRepository::class);
// $repository->setUser(...); //
// $repository->getUser(); //
// $repository->move(null, "dashboard", "sidenavbar"); // Attach "dashboard" menu to "base" menu that is part of "sidenavbar"...
// $repository->move(null, "home", "headernavbar"); // Attach "home" menu to "base" menu that is part of "headernavbar"...
// $repository->move(null, "profile", "headernavbar"); // Attach "profile" menu to "base" menu that is part of "headernavbar"...
// $repository->move(null, "about", "headernavbar"); // Attach "about" menu to "base" menu that is part of "headernavbar"...
// $repository->move(null, "media", "sidenavbar"); // Attach "media" menu to "base" menu that is part of "sidenavbar"...
// $repository->move("media", null, "sidenavbar"); // Detach "media" menu from "base" menu that is part of "sidenavbar"...
// $repository->move("about", null, "headernavbar"); // Detach "about" menu from "base" menu that is part of "headernavbar"...
// $repository->move("profile", null, "headernavbar"); // Detach "profile" menu from "base" menu that is part of "headernavbar"...
// $repository->move("home", null, "headernavbar"); // Detach "home" menu from "base" menu that is part of "headernavbar"...
// $repository->move("dashboard", null, "sidenavbar"); // Attach "dashboard" menu to "base" menu that is part of "sidenavbar"...
// $repository->move("media", "dashboard", "sidenavbar"); // Move "media" menu from "base" menu to inside "dashboard" menu that is part of "sidenavbar"...
// $repository->move("profile", "home", "headernavbar"); // Move "profile" menu from "base" menu to inside "home" menu that is part of "headernavbar"...
// $repository->move("about", "home.profile", "headernavbar"); // Move "about" menu from "base" menu to inside "home"->"profile" menu that is part of "headernavbar"...
// $repository->move("home.profile.about", "home", "headernavbar"); // Move "about" menu from inside "profile"->"about" menu to inside "home" menu that is part of "headernavbar"...
// $repository->all("headernavbar"); //
// $repository->all("sidenavbar"); //