PHP code example of hawkiq / admlte

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

    

hawkiq / admlte example snippets


return [
    'sidebar' => [
        [
            'type' => 'header',
            'text' => 'main.navigation',
            'permission' => null,
        ],
        [
            'type' => 'link',
            'text' => 'Dashboard',
            'route' => 'test1',
            'icon' => 'fas fa-home',
            'permission' => null,
        ],
          [
            'type' => 'link',
            'text' => 'Test Link',
            'route' => 'test2',
            'icon' => 'fas fa-cog',
            'permission' => null,
        ],
    ],
];

    /**
     * Get the login username to be used by the controller.
     *
     * @return string
     */
    public function username()
    {
        return 'username';
    }



return Validator::make($data, [
'name' => ['5'], // << Add this to validator >>
'phone' => ['string', 'max:255', 'unique:users'],
'email' => ['],// << Add this to create User Model >>
'phone' => $data['phone'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);


    /*
    |--------------------------------------------------------------------------
    | Assets Bundling ( Experimental )
    |--------------------------------------------------------------------------
    |
    | Default behavouir is assets from public vendor as files But If you prefer.
    | Using vite bundling you can mark this option as true.notice this is just 
    | Test feature done during testing filament So it might works as you desire .
    |
    */

    'vite' => true,



    /*
    |--------------------------------------------------------------------------
    | Assets Bundling ( Experimental )
    |--------------------------------------------------------------------------
    |
    | Default behavouir is assets from public vendor as files But If you prefer.
    | Using vite bundling you can mark this option as true.notice this is just 
    | Test feature done during testing filament So it might works as you desire .
    |
    */

    'vite' => true,
    'vite_css' => 'resources/css/app.scss',
    'vite_js' => 'resources/js/app.js',



 'navbar' => [
        //Navbar Widgets
        //...
        'language_selector_widget' => true, // Set if you want to show language selector in navbar.


    /*
    |--------------------------------------------------------------------------
    | App Local
    |--------------------------------------------------------------------------
    |
    | List of Supported Langauges for Admin Panel.
    | This will only set language to middleware you still have to translate
    | project by yourself by adding phrases to main.php or your language folder.
    |
    |
    */

    'app_locals' => [
        //Text => Locale Code
        'arabic' => 'ar',
        'english' => 'en',
        'french' => 'fr',
    ],


use Hawkiq\Admlte\Http\Middleware\LanguageMiddleware;

->withMiddleware(function (Middleware $middleware) {
        $middleware->append(LanguageMiddleware::class); // This will be Added only 
    })



'plugins' => [
    /// *** Other Plugins
    'Summernote' => [
        'active' => false,
        'files' => [
            [
                'type' => 'css',
                'asset' => true, // Set this to true if you host files (Optional)
                'location' => 'vendor/summernote/summernote-lite.css',
            ],
            [
                'type' => 'js',
                'asset' => true,
                'location' => 'vendor/summernote/summernote-lite.js',
            ],
        ],
    ],
],



@extends('admlte::page')
@section('plugins.Summernote', true)

@section('content')
    <div class="row-12">
        <div class="md-12">
            <div id="summernote"></div>
        </div>
    </div>
@endsection

@push('js')
    <script>
        $('#summernote').summernote({
            placeholder: 'Hello Artisans from AdmLTE Dashboard',
            tabsize: 2,
            height: 100
        });
    </script>
@endpush


bash
php artisan admlte:install
bash
php artisan admlte:install --only=auth_views
bash
config/admlte.php
bash
php artisan admlte:install --only=views