PHP code example of weiliang / sleepingowl

1. Go to this page and download the library: Download weiliang/sleepingowl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

weiliang / sleepingowl example snippets


      ...
      /*
       * SleepingOwl Service Provider
       */
        SleepingOwl\Admin\Providers\SleepingOwlServiceProvider::class,
  
        /*
       * Application Service Providers...
       */
      App\Providers\AppServiceProvider::class,
      ...
  

  'providers' => [
    'users' => [
      'driver' => 'eloquent',
      'model' => App\User::class,
    ],
    'administrators' => [
      'driver' => 'eloquent',
      'model' => SleepingOwl\Admin\Auth\Administrator::class,
    ],
  ],
  

  'guards' => [
    'web' => [
      'driver' => 'session',
      'provider' => 'administrators', // change existing provider
    ],
    
    // or add new
    
    'admin' => [
      'driver' => 'session',
      'provider' => 'administrators',
    ],
  ],
  

  'defaults' => [
    'guard' => 'web', <- default
    ...
  ],
  

  'middleware' => ['web', 'auth:admin'],
  

  "  "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    ...
    "laravelrus/sleepingowl": "4.*@dev"
  },