1. Go to this page and download the library: Download flawlol/facade 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/ */
flawlol / facade example snippets
namespace App\Facade;
use Flawlol\Facade\Abstract\Facade;
class MyFacade extends Facade
{
protected static function getFacadeAccessor(): string
{
return 'my_service';
}
}
use App\Facade\MyFacade;
$result = MyFacade::someMethod($arg1, $arg2);
namespace Flawlol\Facade;
use Flawlol\Facade\Abstract\Facade;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class FacadeBundle extends Bundle
{
public function boot(): void
{
parent::boot();
$container = $this->container;
Facade::setContainer($container);
}
}