Platform configuration

The platform uses the standard configuration system for Laravel. It locates the main parameters in the config directory, and the main file for the platform is file platform.php. Each set comes with a commentary explaining the main point.

Note. If you cache your configuration files, do not forget to clear them after the change. Using the command php artisan config:clear

Below we dive into the configuration file and give a detailed description of each parameter.

Platform domain

'domain' => env('DASHBOARD_DOMAIN', null),

For many projects, the address of the location of the administration panel plays an important role. For example, the application is located at, and the platform is at or on a third-party domain.

For this you need to specify the address you would like to open.

'domain' => '',

Remember that your web server settings must be configured correctly.

Platform prefix

'prefix' => env('DASHBOARD_PREFIX', 'dashboard'),

It provides the ability to change the dashboard prefix to any other name, such as admin or administrator.


'middleware' => [
    'public'  => ['web'],
    'private' => ['web', 'platform'],

You can add/change intermediate layers (middleware) for the graphical interface. Currently, two groups of public can be seen by an unauthorized user, for example, the "Login" page and private which, on the contrary, only authorized users to see.

You can add as many new intermediate layers as you like. For example, the filtering layer requests only from the white list of IP addresses.

Login page

'auth' => true,

It is possible to disable the supplied authorization form altogether and make your own, for example, using the package Jetstream.

Home page

The main page of the application is recorded in the name route that the user will see when entering or clicking on logos and links.

'index' => 'platform.main',

Dashboard resources

'resource' => [
    'stylesheets' => [],
    'scripts'     => [],

As you work, you may need to add your style sheets or javascript scripts. Globally, on each page, it is necessary to add paths for them to the corresponding arrays.

It is also possible to specify resources through the Dashboard object, for example, in a service provider:

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Orchid\Platform\Dashboard;

class AppServiceProvider extends ServiceProvider
    public function boot(Dashboard $dashboard)
        $dashboard->registerResource('stylesheets', 'custom.css');
        $dashboard->registerResource('scripts', 'custom.js');

Appearance patterns

To change some templates, it is unnecessary to publish the entire package; you can customize a part of the user interface to specify a logo, accompanying documents, etc.

'template' => [
    'header' => null,
    'footer' => null,

Model classes

The desire to change the behavior of some classes from the standard delivery is quite normal. For the platform to use your model classes instead of its own, it is necessary to register their substitution in advance using:

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Orchid\Support\Facades\Dashboard;

class AppServiceProvider extends ServiceProvider
     * Bootstrap any application services.
     * @return void
    public function boot()
        Dashboard::useModel(\Orchid\Platform\Models\User::class, \App\User::class);

You can use the configuration parameter, which allows you to define all the substitutions at once:

    'models' => [
        User::class => MyCustomClass::class,