2017 © Pedro Peláez
 

library laravel-backpack-menu

Manages the editing and rendering of menus in Laravel application using Backpack

image

novius/laravel-backpack-menu

Manages the editing and rendering of menus in Laravel application using Backpack

  • Tuesday, January 30, 2018
  • by novius
  • Repository
  • 4 Watchers
  • 1 Stars
  • 631 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 12 Versions
  • 15 % Grown

The README.md

Laravel Backoffice Menu

Travis Packagist Release Licence, (*1)

Manages the editing and rendering of menus in a Laravel - Backpack application., (*2)

Installation

In your terminal:, (*3)

composer require novius/laravel-backpack-menu

Then, if you are on Laravel 5.4 (no need for Laravel 5.5 and higher), register the service provider to your config/app.php file:, (*4)

Novius\Backpack\Menu\MenuServiceProvider::class

Finally, run:, (*5)

php artisan vendor:publish --provider="Novius\Backpack\Menu\MenuServiceProvider" --tag="routes"
php artisan vendor:publish --provider="Novius\Backpack\Menu\MenuServiceProvider" --tag="lang"
php artisan vendor:publish --provider="Novius\Backpack\Menu\MenuServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Novius\Backpack\Menu\MenuServiceProvider" --tag="views"
php artisan vendor:publish --provider="Novius\Backpack\Menu\MenuServiceProvider" --tag="config"

php artisan migrate

Usage & Features

You can display the menu within your view like this:, (*6)

// The function takes two parameters:
//  1. Slug => Identifies the menu
//  2. Locale => (Optional) Force a locale version of the menu.

\Novius\Backpack\Menu\Models\Menu::display('header', 'en');

To achieve that, first you need:, (*7)

Configure the package. Take a look at the comments in:

/config/laravel-backpack-menu.php

Use the trait LinkedItems in the models you listed in the linkableObjects configuration

use Novius\Backpack\Menu\LinkedItems;

// And optionally overrides the base functionality to suit your needs:

public static function linkableItems(string $prefix = ''): array
public static function linkableRoute(string $routeName, string $translation): array
public function linkableUrl(): string
public function linkableTitle(): string
public function linkableId(): string
<li>
  <a href="{{ route('crud.menu.index') }}">
      <i class="fa fa-list"></i>
      <span>{{ trans('laravel-backpack-menu::menu.menus') }}</span>
  </a>
</li>

Testing

Run the tests with:, (*8)

./test.sh

Any modification must pass all the tests. Any modification should be covered by a test., (*9)

Lint

Run php-cs with:, (*10)

./cs.sh

Contributing

Contributions are welcome! Leave an issue on Github, or create a Pull Request., (*11)

Licence

This package is under GNU Affero General Public License v3 or (at your option) any later version., (*12)

The Versions

30/01 2018

0.3.x-dev

0.3.9999999.9999999-dev

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0 AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

30/01 2018

0.3.0

0.3.0.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

29/01 2018

0.2.x-dev

0.2.9999999.9999999-dev

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0 AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

29/01 2018

0.2.1

0.2.1.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

29/01 2018

0.1.x-dev

0.1.9999999.9999999-dev

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0 AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

29/01 2018

0.1.4

0.1.4.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

29/01 2018

dev-feature/crud-3.3-support

dev-feature/crud-3.3-support

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0 AGPL-3.0-or-later

The Requires

 

The Development Requires

laravel menu backpack novius

20/12 2017

0.2.0

0.2.0.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

laravel menu backpack novius

16/11 2017

0.1.3

0.1.3.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

laravel menu backpack novius

14/11 2017

0.1.2

0.1.2.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

laravel menu backpack novius

07/11 2017

0.1.1

0.1.1.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

laravel menu backpack novius

03/11 2017

0.1.0

0.1.0.0

Manages the editing and rendering of menus in Laravel application using Backpack

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

laravel menu backpack novius