PHP code example of clean-code-studio / laravel-make-facades

1. Go to this page and download the library: Download clean-code-studio/laravel-make-facades 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/ */

    

clean-code-studio / laravel-make-facades example snippets


composer 

return [
   // Directory path save your facades
   'path' => 'app/facades',

  // Namespace Of Your Facades
  'namespace' => 'App\\Facades',

  // Providers path (@see https://github.com/zhorton34/laravel-make-facades/issues/4)
  'providers_path' => 'app/Providers',
  
  // This will find all of the aliases and services defined in your path settings and
  // 1. Bind the service classes for each facade to the service container automatically
  // 2. Register aliases for each facade base on the Class Name the Facade Reference to the service container automatically
  'auto_alias_facades' => true,
];



namespace App\Facades\MyCoolService;

class MyCoolService
{
    // create MyCoolService class
}



namespace App\Facades\MyCoolService;

use Illuminate\Support\Facades\Facade;

class MyCoolServiceFacade extends Facade
{
    protected static function getFacadeAccessor()
    {
        return 'MyCoolService';
    }
}