PHP code example of bearlord / yew-framework

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

    

bearlord / yew-framework example snippets



Yew\Framework\Application;

$app = new Application();
$app->addPlugin(new \Yew\Plugins\Database\DatabasePlugin());
$app->addPlugin(new \Yew\Plugins\Redis\RedisPlugin());
$app->addPlugin(new \Yew\Plugins\Route\RoutePlugin());
$app->addPlugin(new \Yew\Plugins\Mqtt\MqttPlugin());
$app->addPlugin(new \Yew\Plugins\Mqtt\Connection\MqttConnectionPlugin());
$app->run(App\Application::class);
bash
php server.php          # start (debug mode)
php server.php start -d # daemonize