2017 © Pedro Peláez
 

library laravel-admin-menu

image

florientr/laravel-admin-menu

  • Friday, August 18, 2017
  • by FlorientR
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

laravel-admin-menu

Manage actions on models, (*1)

composer require florientr/laravel-admin-menu, (*2)

Florientr\AdminMenu\AdminMenuServiceProvider::class,, (*3)

php artisan vendor:publish --provider=Florientr\AdminMenu\AdminMenuServiceProvider --tag=config, (*4)

php artisan vendor:publish --provider=Florientr\AdminMenu\AdminMenuServiceProvider --tag=views, (*5)

php artisan vendor:publish --provider=Florientr\AdminMenu\AdminMenuServiceProvider --tag=assets, (*6)

mix.copy('resources/css/vendor/admin_menu/admin_menu.css', 'public/css/admin_menu.css');, (*7)

mix.copy('resources/js/vendor/admin_menu/admin_menu.js', 'public/js/admin_menu.js');, (*8)

gulp, (*9)

@push('stylesheets')
    <link rel="stylesheet" href="{{ asset('css/admin_menu.css') }}">
@endpush
@push('scripts')
    <script type="text/javascript" src="{{ asset('js/admin_menu.js') }}"></script>
@endpush
<?php

return [
    'template' => 'vendor.admin_menu.default',

    'actions' => [
        'edit_item' => [
            'label' => 'Item',
            'title' => 'Edit item',
            'permissions' => 'edit item',
            'icon' => 'fa fa-pencil',
            'route' => 'item.edit',
        ],
        'delete_item' => [
            'label' => 'Delete',
            'title' => 'Delete item',
            'permissions' => 'delete item',
            'icon' => 'fa fa-remove',
            'route' => 'item.destroy',
            'type' => 'delete',
        ],
        'js_exemple' => [
            'label' => 'Test JS',
            'title' => 'Test du javascript',
            'icon' => 'fa fa-group',
            'attributes' => [
                'data-test' => 'my_value'
            ]
        ]
    ]
];
use Florientr\AdminMenu\Traits\HasAdminMenu;

use HasAdminMenu;

public function adminMenuConfig()
{
    return [
        'default' => [
            'edit_item' => [
                'route_params' => [
                    'item' => $this->id,
                 ]
            ],
            'delete_item' => [
                'route_params' => [
                    'item' => $this->id,
                 ]
            ]
        ]
    ];
}

The Versions

18/08 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

18/08 2017

0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires