PHP code example of bcartfall / adminlte-laravel

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

    

bcartfall / adminlte-laravel example snippets


/*
 * Acacha AdminLTE template provider
 */
Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class,

/*
 * Acacha AdminLTE template alias
 */
'AdminLTE' => Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class,

php artisan vendor:publish --tag=adminlte --force

App\Providers\RouteServiceProvider::class

Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class

Route::auth();

Route::get('/home', 'HomeController@index');

Route::get('about', 'AboutController@index');

Route::resource('about', 'About@index');

@

'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
    'domain' => 'defaultdomain.com',
],
bash
php artisan make:view about
bash
php artisan make:menu link menuname
bash
php artisan make:menu /contact
bash
php artisan make:route linkname
bash
php artisan make:route about
bash
php artisan make:route about --type=controller
bash
php artisan make:route about MyController@method --type=controller
bash
php artisan make:route about --type=resource
bash
php artisan make:route save --method=post
bash
php artisan make:route save --api
bash
php artisan make:route --help
bash
php artisan adminlte:publish
bash
php artisan adminlte:sidebar
bash
php artisan adminlte:menu
bash
php artisan adminlte:admin
File /home/sergi/Code/AdminLTE/acacha/adminlte-laravel_test/database/seeds/AdminUserSeeder.php created
User Sergi Tur Badenas([email protected]) with the environemnt password (env var ADMIN_PWD) created succesfully!
bash
php artisan make:adminUserSeeder
File /home/sergi/Code/AdminLTE/acacha/adminlte-laravel_test/database/seeds/AdminUserSeeder.php created

php artisan dusk:install
touch database/testing.database.sqlite
php artisan serve --env=dusk.local &
php artisan dusk
bash
php artisan vendor:publish --tag=adminlte_lang --force

php artisan adminlte:username
javascript
<script>
    //See https://laracasts.com/discuss/channels/vue/use-trans-in-vuejs
    window.trans = @php
        // copy all translations from /resources/lang/CURRENT_LOCALE/* to global JS variable
        $lang_files = File::files(resource_path() . '/lang/' . App::getLocale());
        $trans = [];
        foreach ($lang_files as $f) {
            $filename = pathinfo($f)['filename'];
            $trans[$filename] = trans($filename);
        }
        $trans['adminlte_lang_message'] = trans('adminlte_lang::message');
        echo json_encode($trans);
    @endphp
</script>

Vue.prototype.trans = (key) => {
    return _.get(window.trans, key, key);
};