PHP code example of sumantablog / dragndroplaravelmenu
1. Go to this page and download the library: Download sumantablog/dragndroplaravelmenu 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/ */
sumantablog / dragndroplaravelmenu example snippets
@extends('app')
@section('contents')
{!! Menu::render() !!}
@endsection
//YOU MUST HAVE JQUERY LOADED BEFORE menu scripts
@push('scripts')
{!! Menu::scripts() !!}
@endpush
use Sumantablog\Menu\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::get(1);
use Sumantablog\Menu\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::getByName('Admin');
use Sumantablog\Menu\Models\Menus;
use Sumantablog\Menu\Models\MenuItems;
// Used to get the menu items into the blade template
$public_menu = Menu::getByName('Public');