Install via composer
composer require phpsa/laravel-yourls-plugin
Register Service Provider
Note! This and next step are optional if you use laravel>=5.5 with package auto discovery feature.
Add service provider to config/app.php in providers section
'providers' => [
...
Phpsa\LaravelYourlsPlugin\ServiceProvider::class,
];
Optionally register the package facade in config/app.php in aliases section
'aliases' => [
...
'ShortUrl' => Phpsa\LaravelYourlsPlugin\Facades\LaravelYourlsPlugin::class,
]
You can optionally publish the configuration file by running
php artisan vendor:publish --provider="Phpsa\LaravelYourlsPlugin\ServiceProvider" --tag="config"
or set the settings in your env file by using the following keys
LARAVEL_YOURLS_PLUGIN_URL=
LARAVEL_YOURLS_PLUGIN_USERNAME=
LARAVEL_YOURLS_PLUGIN_PASSWORD=
LARAVEL_YOURLS_PLUGIN_SIGNATURE=
LARAVEL_YOURLS_PLUGIN_FORMAT=json
Authentication can use either the username / password combo or the signature