PHP code example of remonhasan / hesh

1. Go to this page and download the library: Download remonhasan/hesh 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/ */

    

remonhasan / hesh example snippets


  composer 

   "minimum-stability": "dev",

  'providers' => [
      Remonhasan\Hesh\HeshServiceProvider::class,
  ],

  use Remonhasan\Hesh\Models\Admin;

  'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
        'admin' => [
            'driver' => 'session',
            'provider' => 'admins',
        ],
    ],

     'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],

        'admins' => [
            'driver' => 'eloquent',
            'model' => Admin::class,
        ],
    ],

  use Remonhasan\Hesh\Middleware\Admin;

   protected $routeMiddleware = [
        'admin' => Admin::class,
    ];

  php artisan migrate

  http://localhost:8000/admin-register
  http://localhost:8000/admin-login