PHP code example of mvaliolahi / blaze

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

    

mvaliolahi / blaze example snippets


class EncryptCookies extends Middleware
{
    protected $except = [
        'blaze_id',
    ];
}

  Route::get('/profile', [ProfileController::class, 'show'])->middleware('blaze:private');
  Route::get('/posts', [PostController::class, 'index'])->middleware('blaze:public');
  

    class Page extends Model
    {
        use Blaze;

        protected $blaze_refresh = true;

        protected $blaze = [
            'private' => ['profile', 'settings'],
            'public'  => ['homepage', 'posts.index'],
        ];
    }