serverfireteam / panel

An easily configurable admin panel for Laravel applications.
MIT License
427 stars 144 forks source link

Allow specify links via config #340

Closed sgtlambda closed 7 years ago

sgtlambda commented 7 years ago

Performed some refactoring and code clean-up and added the ability to specify the links to display as an array in config/panel.php

Example


    // Uncomment the section below to use links specified here rather than in the DB table "links"
    // 'links' => [
    //     'Links'       => [ // use the display name as the key
    //         'model'     => 'Link', // model name, same as "url" in the database
    //         'custom'    => false, // not "main"? defaults to true
    //         'show_menu' => true, // defaults to true
    //     ],
    //     'Roles'       => [
    //         'model'     => 'Role',
    //         'custom'    => false,
    //         'show_menu' => true,
    //     ],
    //     'Permissions' => [
    //         'model'     => 'Permission',
    //         'custom'    => false,
    //         'show_menu' => true,
    //     ],
    //     'Admins'      => [
    //         'model'     => 'Admin',
    //         'custom'    => false,
    //         'show_menu' => true,
    //     ],
    // ],

    // Example of short notation style:
    // 'links' => [
    //     'Customers'
    // ],

    // This is equivalent to
    // 'links' => [
    //     'Customers' => [
    //         'model'     => 'Customer',
    //         'custom'    => true,
    //         'show_menu' => true,
    //     ],
    // ],
AlirezaAlgo commented 7 years ago

Great job, thank you

AlirezaAlgo commented 7 years ago

@sgtlambda tested your code, works very good. How can i thank you? Keep up good works.

sgtlambda commented 7 years ago

No need to thank me! Thank you for providing such a nice package that addresses a very common and otherwise unresolved problem in laravel: creating simple CRUD interfaces!! I would love to contribute more to this project so if you don't mind I will be submitting various other PR's including some minor refactoring and more documentation.

AlirezaAlgo commented 7 years ago

All your PR's are welcome :)