PHPackages                             ctf0/simple-menu - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ctf0/simple-menu

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ctf0/simple-menu
================

create a menu that support page (multiLocale 'title/ url/ prefix', nesting, template, static/dynamic, roles &amp; permissions).

v4.1.6(5y ago)201012MITBlade

Since Jun 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ctf0/SimpleMenu)[ Packagist](https://packagist.org/packages/ctf0/simple-menu)[ Docs](https://github.com/ctf0/SimpleMenu)[ RSS](/packages/ctf0-simple-menu/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (8)Versions (69)Used By (0)

 SimpleMenu
 [![Latest Stable Version](https://camo.githubusercontent.com/a0f7ebc972f66f15208cef553501099eb251aa701c2099b0c890c141e35a0615/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637466302f73696d706c652d6d656e752e737667)](https://packagist.org/packages/ctf0/simple-menu) [![Total Downloads](https://camo.githubusercontent.com/d4d36801ce9c0c14c37c88f6b45e94667a4f28d0dc1c6afd12a9d697dfb9e00b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637466302f73696d706c652d6d656e752e737667)](https://packagist.org/packages/ctf0/simple-menu)
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#----simplemenu---------)

Create menus &amp; pages that support (multiLocale "title, url, body, ...", nesting, template, static &amp; dynamic data, roles &amp; permissions).

- package requires Laravel v5.5+
- package rely heavily on caching so make sure to install one of the tag enabled drivers [Memcached / Redis](https://laravel.com/docs/5.5/cache)

Installation
------------

[](#installation)

- `composer require ctf0/simple-menu`
- after installation, run `php artisan sm:setup` to add

    - package routes to `routes/web.php`
    - package assets compiling to `webpack.mix.js`
- publish the packages assets with `php artisan vendor:publish`

    - [simpleMenu](https://github.com/ctf0/simple-menu/wiki/Publish)
    - [laravel-permission](https://github.com/spatie/laravel-permission#laravel)
    - [laravel-translatable](https://github.com/spatie/laravel-translatable#installation)
    - [laravel-localization](https://github.com/mcamara/laravel-localization#config)
- install JS dependencies

    ```
    yarn add vue axios vue-tippy@v2 vuedraggable vue-notif vue-multi-ref vue-awesome@v2 list.js
    ```
- add this one liner to your main js file and run `npm run watch` to compile your `js/css` files.

    - if you are having issues [Check](https://ctf0.wordpress.com/2017/09/12/laravel-mix-es6/).

    ```
    // app.js

    window.Vue = require('vue')

    require('../vendor/SimpleMenu/js/manager')

    new Vue({
        el: '#app'
    })
    ```

Config
------

[](#config)

**config/simpleMenu.php**

```
return [
    /*
     * the menu list classes to be used for "render()"
     */
    'listClasses' => [
        'ul' => 'menu-list',
        'li' => 'list-item',
        'a' => 'is-active',
    ],

    /*
     * the path where we will save the routes list
     */
    'routeListPath' => storage_path('logs/simpleMenu.php'),

    /*
     * where to redirect when a route is available in one locale "en" but not in another "fr" ?
     */
    'unFoundLocalizedRoute' => 'root',

    /*
     * package models
     */
    'models'=> [
        'user' => App\User::class,
        'page' => \ctf0\SimpleMenu\Models\Page::class,
        'menu' => \ctf0\SimpleMenu\Models\Menu::class,
    ],

    /*
     * when adding a page which is a nest of a nother to a menu, ex.
     *
     * root
     *   | child 1
     *     | child 2 "add this along with its childrens to another menu"
     *       | child 3
     *
     * do you want to clear its parent and make it a root ?
     */
    'clearPartialyNestedParent' => true,

    /*
     * when removing a root page from a menu, ex.
     *
     * root "remove"
     *   | child 1
     *     | child 2
     *       | child 3
     *
     * do you want clear all of its 'Descendants' ?
     */
    'clearRootDescendants' => false,

    /*
     * when removing a nest from a list, ex.
     *
     * root
     *   | child 1
     *     | child 2 "remove"
     *       | child 3
     *
     * do you want to reset its hierarchy ?
     */
    'clearNestDescendants'=> false,

    /*
     * when deleting a page "from the db", ex.
     *
     * page "delete/destroy"
     *   | nested child 1
     *     | nested child 2
     *       | nested child 3
     *
     * do you also want to delete all of its children ?
     */
    'deletePageAndNests' => false,

    /*
     * package routes url & route name prefix
     */
    'crud_prefix' => 'admin',

    /*
     * all the package controllers
     *
     * if you need to change anything, just create new controller
     * and extend from the below original
     * ex. "class ExampleController extends PagesController"
     */
    'controllers'=> [
        'permissions' => '\ctf0\SimpleMenu\Controllers\Admin\PermissionsController',
        'admin' => '\ctf0\SimpleMenu\Controllers\Admin\AdminController@index',
        'users' => '\ctf0\SimpleMenu\Controllers\Admin\UsersController',
        'pages' => '\ctf0\SimpleMenu\Controllers\Admin\PagesController',
        'roles' => '\ctf0\SimpleMenu\Controllers\Admin\RolesController',
        'menus' => '\ctf0\SimpleMenu\Controllers\Admin\MenusController',
    ],
];
```

Usage
-----

[](#usage)

> [Demo](https://github.com/ctf0/demos/tree/simple-menu)
> [Usage](https://github.com/ctf0/simple-menu/wiki/Usage)
> [Views](https://github.com/ctf0/SimpleMenu/wiki/Crud-Views)

- add `SMUsers` trait to your **User Model**

    ```
    use ctf0\SimpleMenu\Models\Traits\SMUsers;

    // ...

    class User extends Authenticatable
    {
        use Notifiable, SMUsers;
    }
    ```
- visit `localhost:8000/admin`

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~111 days

Total

68

Last Release

2037d ago

Major Versions

v1.2.2 → v2.0.02017-07-19

v2.2.4 → v3.0.02017-09-01

v3.3.7 → v4.0.02018-09-10

PHP version history (3 changes)v1.0.0PHP &gt;=5.6.4

v2.2.4PHP ~7.0

v4.1.5PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/51dbfff65441e32301575f8ac241895817975e754d15574b86f543b33f1961f6?d=identicon)[ctf0](/maintainers/ctf0)

---

Top Contributors

[![ctf0](https://avatars.githubusercontent.com/u/7388088?v=4)](https://github.com/ctf0 "ctf0 (225 commits)")

---

Tags

javascriptlaravelmanagermenu-generatorphpsimplemenuvuejslaravelguimanagermenuctf0multi-localeSimpleMenu

### Embed Badge

![Health badge](/badges/ctf0-simple-menu/health.svg)

```
[![Health](https://phpackages.com/badges/ctf0-simple-menu/health.svg)](https://phpackages.com/packages/ctf0-simple-menu)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

42010.0k](/packages/venturedrake-laravel-crm)[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1763.3k](/packages/cybercog-laravel-paket)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
