Dashboard extension



Routing

ORCHID application can change request address. If you want your extensions to follow the dashboard, you should specify the domain and prefix. It may seem like this:

$this->domain(config('platform.domain'))->group(function () {
    $this->group([
        'middleware' => config('platform.middleware.private'),
        'prefix'     => \Orchid\Platform\Dashboard::prefix(),
        'namespace'  => 'Orchid\Platform\Http\Controllers',
    ], function (\Illuminate\Routing\Router $router) {

        $router->get('/', function () {
            return view('welcome');
        });

    });
});

Display

During the work you might need to create your own display variation (view), to provide common appearance you should proceed as follows:

@extends('platform::layouts.dashboard')

@section('title','title')
@section('description', 'description')

@section('content')

    <div>
        Content
    </div>

@stop

Additional styles and scripts

If you need to add styles and scripts globally, to every page, then use the following:

namespace App\Providers;

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

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot(Dashboard $dashboard)
    {
        $dashboard->registerResource('stylesheets','custom.css');
        $dashboard->registerResource('scripts','custom.js');
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}