appsketch / adfly
An Adfly wrapper for Laravel 5 and 5.1.
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.1.1
2015-07-17 15:07 UTC
Requires (Dev)
- phpspec/phpspec: ~2.0
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-02-03 14:25:42 UTC
README
Installation
First, pull in the package through Composer.
composer require appsketch/adfly
And then, if using Laravel 5.1, include the service provider within app/config/app.php
.
'providers' => [ Appsketch\Adfly\Providers\AdflyServiceProvider::class, ]
if using Laravel 5. include this service provider.
'providers' => [ "Appsketch\Adfly\Providers\AdflyServiceProvider", ]
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. Note, key and uid are required. All configurations can be overwritten in the options array.
Usage
Within, for example the routes.php add this.
Route::get('/adfly', function() { // Adfly options. $options = [ 'title' => 'Link to Google' ]; // this will for example echo http://adf.ly/1KMh2Z. echo Adfly::create("http://www.google.com/", $options); });