Configuration
You can find the main configuration file in config/hotcoffee.php
after installation. It contains various options to configure the admin panel. Additionally you can publish a few more configuration files to help you with changing/extending some of the modules. More about that bellow.
Always runphp artisan config:clear
after you changed something to rebuild the configuration cache.
Admin Panel Prefix
Define the URL prefix for the admin panel. Another option will be to add ADMIN_PREFIX
variable in the .env
file.
Custom Logo
Want to use your own logo in the admin panel? Just define a path to the new image. If null the default logo image will be used.
Start Route
Name of the route where the admin users are redirected to after they login.
Additional Resources
You can add custom style sheets and scripts that will be included in the hotCoffee admin panel. The resources should be placed in the "public" folder.
Model Languages / Translations
All the languages your app is going to use, or otherwise said, the languages (locales) your models are going to be tranlsated to. hotCoffee will automatically create translatable fields in the templates for each language. By default the InfoPage, MenuItem and Article models are translatable.
To make your models translatable they should use the Spatie\Translatable\HasTranslations
trait. You also need to define which of the properties are translatable public $translatable = ['title', 'content'];
. When creating the template you can use the helper method {!! language_fields($fields) !!}
to automatically generate the HTML fields for each language. You can read more about this in the Helper Methods section. Also check https://github.com/spatie/laravel-translatable for the extended documentation about translating models.
If you don't need multiple language support leave only the locale your app is going to use. The first language in the array is going to be the default one.
Flag icons are loaded from public/vendor/hotcoffee/img/flags
so if the acranym is 'en' the loaded image will be en.svg
from that directory.
Admin Languages
At this time hotCoffee comes with English and Bulgarian translations for it's admin zone interface. You can comment out the ones you don't need from the array. The first language in the array is going to be the default one. Instead of changing the package’s core files, you may override them by placing files in the resources/lang/vendor/hotcoffee/{locale}
directory. If more than one locale is defined in the array admin users will be able to switch between the languages from the top menu.
Flag icons are loaded from public/vendor/hotcoffee/img/flags
so if the acranym is 'en' the loaded image will be en.svg
from that directory.
Auth History
If enabled this will keep a record of admin user logins. You can also specify how many recent logs to display in dashboard.
Admin Navigation
You can add or remove elements from the admin navigation (right sidebar) in the nav
array.
name The name (text of the menu element) can either be a string, or a key of a translation string.
'name' => 'file.key'
or'name' => 'Simple String'
.route The name of the route where users will be redirected after clicking.
views The menu item will have a class of "active" whenever one of the given views is loaded.
hr If
'hr' => true
a horizontal line (divider) will be added after the menu item.params Any additional parameters to the route name. For example if you want to link to a specific user page you can do this:
'route' => 'hotcoffee.admin.users.edit', 'params' => 2
This is basically equal toroute('hotcoffee.admin.user.edit', 2);
and it will populate theahref
attribute withahref="https://yourapp.com/admin/users/2"
.icon You can use font awesome icons or nucleo icons. Either "
ni ni-{icon_name}
" or "fa fa-{icon_name}
" . Check these urls: https://fontawesome.com/icons?d=gallery&m=free https://demos.creative-tim.com/argon-dashboard/docs/foundation/icons.htmlcolor Color for the icon. Example:
'color' => 'yellow'
.
Secondary Menu
You can have additional links in your secondary menu. However if you feel like you don't really need it you can hide it.
You can swap the icon.
The secondary_menu
array contains all the menu items. Each item should be defined as an associative array:
Disabled Controllers
Some times you might want to disable access to some controllers if you don't plan to use them or if you don't want your client to have access to sensitive settings or some more advanced features (like adding or editing user roles). It's also recommended that you remove any links to the disabled controllers from the navigation.
In the example above the RoleController
and FlushController
are disabled. Meaning if somebody tries to reach any it's methods/routes they will be redirected back with an error message "access denied". Of course you can also overwrite all the routes for those controllers or overwrite the controllers themselves, but "disabling" them is a faster solution.
TinyMCE Integration
This is where you can configure the TinyMCE integration. You can add more plugins, icons to the context menu and toolbars. You can also disable the File Manager integration if you prefer to. For all possible variables and functions, please refer to the TinyMCE documentation.
Searchable Models
Want to be able to search in more DB tables? Read more here.
Exporting
Need to export models? Read here.
Settings Page
Need to add or remove some fields in the Settings page? Read how to do that here.
Info Pages, Users and Articles
Additionally you can publish the configuration files for the Info Pages
, Articles
or Users
modules. These files will be copied in config/hotcoffee/{filename}
.
Last updated