PHP code example of tripteki / laravelphp-menu
1. Go to this page and download the library: Download tripteki/laravelphp-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-menu example snippets
use Tripteki\Menu\Contracts\Repository\Admin\IMenuAdminRepository;
use Tripteki\Menu\Contracts\Repository\IMenuRepository;
$menuAdminRepository = app(IMenuAdminRepository::class);
// $menuAdminRepository->create([ "platform" => "desktop", "route" => "ads", "nth" => 0, "title" => "ads_gallery", "metadata" => [ "icon" => "ic-gallery", "sound" => "tones/default.mp3", ], "description" => "Gallery", ]); //
// $menuAdminRepository->delete("identifier"); //
// $menuAdminRepository->update("identifier", [ "platform" => "desktop", "route" => "ads", "nth" => 1, "title" => "ads_gallery", "metadata" => [ "icon" => "ic-gallery", "sound" => "tones/default.mp3", ], "description" => "Gallery", ]); //
// $menuAdminRepository->activate("identifier"); //
// $menuAdminRepository->deactivate("identifier"); //
// $menuAdminRepository->get("identifier"); //
// $menuAdminRepository->all(); //
$repository = app(IMenuRepository::class);
// $repository->get("desktop", "ads", 5); //
// $repository->all("web", "ads"); //
// $repository->all("mobile", "ads"); //
// $repository->all("desktop", "ads"); //
php artisan vendor:publish --tag=tripteki-laravelphp-menu-migrations
php artisan migrate