PHP code example of kineticamobile / atrochar

1. Go to this page and download the library: Download kineticamobile/atrochar 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/ */

    

kineticamobile / atrochar example snippets


    @menu("Dasboard")

    @menu(1)

    $menu = Menu::find(1);
    [...]
    @menu($menu)

    /**
     * @return bool
     */
    public function canManageMenus()
    {
        // For example
        return $this->hasRole('Admin');
    }

    /**
     * @return bool
     */
    public function canViewMenuItem($ability)
    {
        // For example
        return $this->getAllPermissions()->pluck('name')->contains($ability);
    }

return [
    "defaultTheme" => [
        "linkTag" => "a",
        "class" => "",
        "activeClass" => "",
        "listStartTag" => "<ul>",
        "listEndTag" => "</ul>",
        "itemStartTag" => "<li>",
        "itemEndTag" => "</li>",
    ],
    "themes" => [
        "jetstream" => [
            "linkTag" => "a",
            "class" =>       "inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out",
            "activeClass" => "inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out",
            "listStartTag" => "",
            "listEndTag" => "",
            "itemStartTag" => "",
            "itemEndTag" => "",
        ]
    ]
];

    @menu("Dasboard", "jetstream")

    @menu($menu, ["class" => "bg-gray-500 font-mono"])
 bash
$ php artisan migrate
 php
<a href="{{ route('atrochar.menus.index') }}"> {{ __('Menus') }} </a>
 bash
$ php artisan vendor:publish --tag=atrochar.views 
 bash
$ php artisan vendor:publish --tag=atrochar.config
 bash
$ php artisan vendor:publish --tag=atrochar.config
bash
$ php artisan vendor:publish --tag=atrochar.config