Download the PHP package phpsa/laravel-yourls-plugin without Composer
On this page you can find all versions of the php package phpsa/laravel-yourls-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpsa/laravel-yourls-plugin
More information about phpsa/laravel-yourls-plugin
Files in phpsa/laravel-yourls-plugin
Package laravel-yourls-plugin
Short Description Plugin which integrates Laravel with Yourls (Your Own URL Shortener).
License MIT
Informations about the package laravel-yourls-plugin
Laravel Yourls Plugin
Package description: Plugin which integrates Laravel with Yourls (Your Own URL Shortener).
Installation
Install via composer
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
Register Facade
Register package facade in config/app.php
in aliases
section
Publish Configuration File (optional)
Configuration Settings
you can set the following values in your environment file
Authentication can use either the username / password combo or the signature
Usage
using the Facade: you can access the following methods:
shorturl
Generates a short url for your long url
Parameters
- $url - required - the url you wish to create a short url for
- $title - optional - Title of the short url
- $keyword - optional - Title for the short url (ie short.url/{keyword})
- $format - optional - Change the format for this specific request (json / xml)
Returns string - the short url that was generated
expand
Expands inforation about your short url
Parameters
- $shorturl - required - the shorturl to expand (can be either 'abc' or 'http://site/abc')
- $format - optional - Change the format for this specific request (json / xml)
Returns stdClass - object of the response details
urlStats
Get stats about one short URL
Parameters
- $shorturl - required - the shorturl to expand (can be either 'abc' or 'http://site/abc')
- $format - optional - Change the format for this specific request (json / xml)
Returns stdClass - object of the response details
stats
Get stats about one short URL
Parameters
- $filter - optional - the filter: either "top", "bottom" , "rand" or "last"
- $limit - optional - the limit (maximum number of links to return)
- $format - optional - Change the format for this specific request (json / xml)
Returns stdClass - object of the response details
dbStats
Get stats about one short URL
Parameters
- $format - optional - Change the format for this specific request (json / xml)
Returns stdClass - object of the response details
getLastResponse
Gets the full response body from the last request
Parameters N/A
Returns stdClass|string response of the last request body
Security
If you discover any security related issues, please email instead of using the issue tracker.
Credits
All versions of laravel-yourls-plugin with dependencies
illuminate/support Version ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0
guzzlehttp/guzzle Version ~6.0|^7.0