Revo Docs
v16.0.1

Installation

Require the package.

composer require revosystems/thrust
Copied!

Dejavu

Thrust uses the Dejavu package. If you don't have it set up, you should set it up.

module.exports = {
    content: [
        ...
        './vendor/revosystems/thrust/**/*.blade.php',
    ]
}
Copied!

JS

Thrust comes with a bundled thrust.min.js that you need to include in you asset js generation.

Configuration

You need to create the config/thrust.php file to set up the basic configuration.

return [
    'translationsPrefix'             => 'admin.',
    'translationsDescriptionsPrefix' => 'pageDescription.',
    'routePrefix'                    => 'thrust',
    'routeMiddleware'                => ['web', 'auth'],
    //'indexLayout'                    => 'layouts.admin',
    'indexLayout'              => 'layouts.app',
    'minSearchChars'           => 3,
    'sidebar-collapsed-button' => 'components.sidebar.collapsed-button',
    //    'popupId'    => '#popup_wrapper',
    //    'recursiveResourcesSearch' => true
];
Copied!

Service provider

When thrust boots up, it will call the Thrust::service callback where you can set up things depending on the user.

Thrust::serving(function () {
    Currency::setFormatter('es_ES', auth()->user()->getBusiness()?->currency ?? 'EUR');
});
Copied!