A simple, but powerful, package for include an Admin bar (like Wordpress) in your next fantastic Laravel project.
You can install the package via composer:
composer require murdercode/laravel-admin-bar
You can publish the config file with:
php artisan vendor:publish --tag="admin-bar-config"
This is the contents of the published config file:
<?php
// config for Murdercode/LaravelAdminBar
return [
'style' => [
'show3labsLogo' => true,
'theme' => 'dark', // 'light' or 'dark'
'max-width' => '1200px',
'position' => 'bottom', // 'top' or 'bottom'
'font-size' => '14px',
],
'config' => [
'adminUrl' => '/cms',
'editPost' => [
'enabled' => true,
'uris' => ['articoli/{slug}', 'notizie/{slug}', 'recensioni/{slug}'], // detect the current route as defined in your routes/web.php
'wildcard' => 'slug', // the wildcard for the parameter (as over)
'parameterForSearch' => 'slug', // the parameter to be used for search the post
'model' => \App\Models\Post::class, // the model to be used for search the post
'parameterToReturn' => 'id', // the value to be returned
'targetEndpointUrl' => '/cms/resources/posts/{parameter}',
],
'emptyCachePost' => [
'enabled' => true,
'uris' => ['articoli/{slug}', 'notizie/{slug}', 'recensioni/{slug}'], // detect the current route as defined in your routes/web.php
'wildcard' => 'post', // the wildcard for the parameter (as over)
'parameterForSearch' => 'slug', // the parameter to be used for search the post
'model' => \App\Models\Post::class, // the model to be used for search the post
'parameterToReturn' => 'id', // the value to be returned
'targetEndpointUrl' => '/posts/{parameter}?nocache',
],
],
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="laravel-admin-bar-views"
In any part of your layout you can include the admin bar using the following code:
{{LaravelAdminBar::render()}}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.