mzaharov / shortest
A shorte.st wrapper for Laravel 8
dev-master
2021-08-30 13:53 UTC
Requires (Dev)
- phpspec/phpspec: ~2.0
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2025-07-27 09:45:24 UTC
README
Installation
First, pull in the package through Composer.
composer require appsketch/shortest
And then, if using Laravel 5.1, include the service provider within app/config/app.php
.
'providers' => [ Appsketch\Shortest\Providers\ShortestServiceProvider::class, ]
if using Laravel 5. include this service provider.
'providers' => [ "Appsketch\Shortest\Providers\ShortestServiceProvider", ]
The alias will automatically set.
Publish the config file to the config folder with the following command.
php artisan vendor:publish
.
Fill out the config file.
Usage
Within, for example the routes.php add this.
Route::get('/shortest', function() { // this will for example echo http://sh.st/v0v8m. echo Shortest::link("http://www.google.com/"); });