Getting Started
Configuration
Autoload comes with a default, recommended set of configuration files, however, you can publish these to your Laravel application and customize them.
Publishing the Configuration
To publish the configuration, run this command:
1php artisan vendor:publish --provider="Mergeloop\Autoload\AutoloadServiceProvider" --tag=config --force
This will publish both a autoload.php
file and a autoload_documentation.php
file
inside your app/config
directory. From here, you may edit either file to customize the site to
your needs.
It's also important to note that you can remove any of the configuration keys from autoload.php
that you are not customizing, this will allow to streamline your configuration file because Laravel will default
to the configuration file within the Autoload package itself.
Customizations
The autoload.php
config file follows standard Laravel config file conventions, therefore can be
accessed the same way.
Each key within the config file's array can be fetched via config('autoload.KEY_NAME')
. These keys
are named appropriately to what they do within Autoload; such as;
-
image_driver
= determines which PHP image driver extension to use when compressing and manipulating images. -
can_edit_pages
= determines if an authenticated User can see the "Edit Page" button on a Page to quickly access that Page's content in the CMS. -
image_compression_quality
= determines at what percentage to compress a file or image.
and so on. Full details on all configurations below.
Built-in Documentation
Autoload comes bundled with Built-in Documentation that is available to all, authenticated Users within the CMS. There are Links in Cards above all Filament Resources that link to specific sections of documentation for easy access.
You can add more pages to the Built-in Documentation using this configuration file, read more about how to do that here.
All Configuration Options
-
user_model
= The Laravel User Model that will be used for authentication -
menu_item_models
= An array of Filament Model relationships that can be used on Menu Items for URL linking. -
page_filament_relationships
= An array of Filament Model relationships that extend a Page via it'spageable
relationship. -
sitemap_pages
= An array of additional, hardcoded pages outside the scope of Autoload Pages. i.e. any route you define explicitly in your ownroutes.php
file. See more here. -
minify_cache
= A boolean on whether your static cached HTML pages will be minified during deployment, i.e. removing whitespaces -
image_compression_quality
= determines at what percentage to compress a file or image. -
cache_page_responses
= A boolean on whether any Page responses should be [cached](/docs/caching). -
cache_ignored_routes
= An array of URL Slugs of Pages that should not be cached. -
cache_ignored_responses
= An array of URL Slugs of responses that should not be cached, i.e. Livewire message/validation responses. -
primary_cms_color
= A Filament-provided Color enum, ex:\Filament\Support\Colors\Color::Blue
-
notification_bar_placements
= An array of placement options for the Notification Bar. -
custom_role_permissions
= An array of custom roles and/or permission strings to be added to the default Autoload permissions.