Configuration

The configuration file is located in config/lap.php. This allows you to modify your demo mode settings and override classes used by the package.

Demo Mode

Demo mode can be enabled or disabled by setting enabled to true or false. Each request is checked using the RestrictDemo middleware, and if demo mode is enabled, it will stop request methods and routes that are not specifically whitelisted.

In order to set your demo mode whitelist, simply modify the whitelist array. Setting methods will allow any request for the specified method. Setting routes will allow any request for the specified URLs. You can use wildcards in the URLs you specify e.g. admin/activity_logs*.

You can also set a demo mode username and password, which auto-populates the login form when demo mode is enabled. This makes it easy for people to check out your app without having to worry about inputting credentials. Make sure this user exists in the database or login will obviously fail.

Classes

You can modify the classes used by the package by setting them in the controllers and models arrays. This allows you to easily extend the existing classes and make any changes you need, without having to modify any other package files.

You can see an example of this in App\Http\Controllers\Admin\BackendController:

<?php

namespace App\Http\Controllers\Admin;

use Kjjdion\LaravelAdminPanel\Controllers\BackendController as LapBackendController;

class BackendController extends LapBackendController
{
        public function dashboard()
        {
                return view('lap::backend.dashboard');
        }

        ...

This controller file is automatically created when you install LAP and publish the install files. Now making changes to the dashboard is easy and fast.