PHP code example of codezero / laravel-stagefront

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

    

codezero / laravel-stagefront example snippets


protected $middlewareGroups = [
    'web' => [
        \Illuminate\Session\Middleware\StartSession::class, // <= after this
        \CodeZero\StageFront\Middleware\RedirectIfStageFrontIsEnabled::class,
        //...
    ],
];

protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class, // <= after this
    \CodeZero\StageFront\Middleware\RedirectIfStageFrontIsEnabled::class,
    //...
];

'ignore_urls' => [
    // ignores /john, but noting under /john
    '/john',
    // ignores everyting under /jane, but not /jane itself
    '/jane/*',
],

'ignore_domains' => [
    'admin.domain.com',
],
bash
php artisan stagefront:credentials <username> <password> --encrypt
bash
php artisan stagefront:credentials
bash
php artisan stagefront:enable
php artisan stagefront:disable
bash
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="lang"
bash
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="views"