1. Go to this page and download the library: Download peyman3d/laravel-share 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/ */
// Change key
share()->key('menu');
// Make new item with key and value
share()->make($key, $value, $single);
// Create new item to current key
share()->make('menu')->item('dashboard');
// Prepend an item to current key
share()->make('menu')->prepend('posts');
// Add a child to array
share()->make('menu')->item('users')->child('users-list');
// Check if key exists
share()->key('menu')->has('dashboard');
// Get from array with key
// Second parameter is for get result as single value or collection
share()->key('menu')->get('users', true);
// Pull data from array and delete it
share()->key('menu')->pull('users', true);
// Get all data
share()->all();
// Delete data for current key
share()->key('menu.users')->delete();
// Delete all data
share()->reset();
// Create new menu with items
share()->menu()->item('dashboard')->label('Dashboard')->href('/admin/');
share()->menu()->item('users')->label('Users')->route('admin.users');
share()->menu('users')->child('users-profile')->label('Profile')->route('admin.users.profile');
share()->menu('users')->child('users-list')->label('All users')->route('admin.users.index');
share()->menu('users')->child('users-create')->label('Add new user')->route('admin.users.create');
// Manage Assets
share()->js('jquery')->link('https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js')->order(500);
share()->js('react')->link('https://cdnjs.cloudflare.com/ajax/libs/react/16.4.0/umd/react.production.min.js')->order(300);