PHP code example of observer / laravel-pdd

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

    

observer / laravel-pdd example snippets


'providers' => [
    // ...
    Observer\LaravelPdd\ServiceProvider::class,
],
'aliases' => [
    // ...
    'EasyPdd' => Observer\LaravelPdd\Facade::class,
],



namespace App\Http\Controllers;

use EasyPdd\Foundation\Application;

class PddController extends Controller
{

    public function demo(Application $pdd)
    {
        // $pdd 则为容器中 EasyPdd\Foundation\Application 的实例
    }
}

EasyPdd::offsetGet('oauth');

shell
php artisan vendor:publish --provider="Observer\LaravelPdd\ServiceProvider"