demo-sdk-for-Laravel5.5
一个Laravel5.5的扩展包示例, (*1)
Installation
Require this package with composer. It is recommended to only require the package for development., (*2)
composer require omgzui/omgzui
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider., (*3)
Laravel 5.5+:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php, (*4)
\OMGZui\OMGZui\OMGZuiServiceProvider::class
If you want to use the facade to log messages, add this to your facades in app.php:, (*5)
'OMGZui' => \OMGZui\OMGZui\Facades\OMGZui::class,
Copy the package config to your local config with the publish command:, (*6)
php artisan vendor:publish --provider="\OMGZui\OMGZui\OMGZuiServiceProvider"
Lumen:
For Lumen, register a different Provider in bootstrap/app.php:, (*7)
$app->register(\OMGZui\OMGZui\OMGZuiServiceProvider::class);
To change the configuration, copy the file to your config folder and enable it:, (*8)
$app->configure('omgzui');
Usage
OMGZui::getName(); //小粽子