PHP code example of sikhlana / laravel-singleton

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

    

sikhlana / laravel-singleton example snippets


// config/app.php
'providers' => [
    ...
    Sikhlana\Singleton\SingletonServiceProvider::class,
],

use Sikhlana\Singleton\Singleton;

class MySingletonClass implements Singleton
{
    ...
}