devnull-ir/facades

Laravel Facade for Pure php!

v1.1.1 2023-05-29 15:08 UTC

This package is auto-updated.

Last update: 2024-06-05 15:04:49 UTC


README

use

one step:

include __DIR__ . "/vendor/autoload.php";

step two:

Create Your dynamic Class

step three: Create static Facade Class for example:

<?php

namespace Facades;

class TestFacade extends Facade
{
    /**
     * @return string
     */
    public static function setNameSpace(): string
    {
        return Test::class; // TODO: Change the autogenerated stub
    }
}

and show dependency:

add methods in comments in top class:

<?php

namespace Facades;


/**
 * Method for Test Class
 *
 * @method static string string()
 * @method static string abs()
 */
class TestFacade extends Facade
{
    /**
     * @return string
     */
    public static function setNameSpace(): string
    {
        return Test::class; // TODO: Change the autogenerated stub
    }
}

facade for dynamic class extend as Facades\Facade