caherrera / shortio-laravel
shortio-laravel Is A ShortIO Api For Laravel
Requires
- ext-json: *
- illuminate/contracts: ^7.0
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ^5.3
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-10-30 00:46:34 UTC
README
Laravel Shortio was created by, and is maintained by Carlos Herrera, and is a PHP API Client for Short.io bridge for Laravel. Feel free to check out the change log, releases, security policy, license, code of conduct, and contribution guidelines.
Installation
Laravel GitLab requires PHP 7.2-7.4. This particular version supports Laravel 7.
To get the latest version, simply require the project using Composer.
$ composer require caherrera/shortio-laravel
Once installed, if you are not using automatic package discovery, then you need to register the Shortio\Laravel\ShortioServiceProvider
service provider in your config/app.php
.
You can also optionally alias our facade:
'Shortio' => Shortio\Laravel\Facades\Shortio::class,
Configuration
Laravel GitLab requires connection configuration.
To get started, you'll need to publish all vendor assets:
$ php artisan vendor:publish
This will create a config/shortio.php
file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.
Real Examples
Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is main
. After you enter your authentication details in the config file, it will just work:
use Shortio\Laravel\Facades\Shortio; // you can alias this in config/app.php if you like shortio::domains()->all(); // we're done here - how easy was that, it just works!
If you prefer to use models over facades like me, then you can easily inject the manager like so:
use Shortio\Laravel\Model\Link; class Foo { protected $link; public function __construct() { $this->link = new Link(); } public function bar() { return $this->link->all(); } }
Further Information
There are other classes in this package that are not documented here. This is because they are not intended for public use and are used internally by this package.
Security
If you discover a security vulnerability within this package, please rise an issue. All security vulnerabilities will be promptly addressed. You may view our full security policy here.
License
Laravel GitLab is licensed under The MIT License (MIT).
Contributions
Special thanks to
- Gabriel Lavini
- Francisco Molina
- Felipe Galdamez
- Juan Bardas