spotonlive / laravel-facebook-ads
Facebook integration for Laravel
Installs: 17 030
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 4
Forks: 11
Open Issues: 3
Requires
- php: >=5.5.0
- facebook/php-ads-sdk: ^15.0.0
- laravel/framework: ^5.0|^6.0|^7.0|^8.0|^9.0
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- mockery/mockery: ~0.9.4
- phpmd/phpmd: 1.4.*
- phpunit/phpunit: ~4.0
README
Facebook Ads API for Laravel 5.*
This package is an integration of facebook/facebook-php-ads-sdk
in Laravel 5.*.
Composer
- Run
$ composer require spotonlive/laravel-facebook-ads
Examples
Client
<?php namespace App\Http\Controllers; use LaravelFacebook\Clients\Facebook; class AdsController { /** @var Facebook */ protected $facebookClient; public function __construct(Facebook $facebookClient) { $this->facebookClient = $facebookClient; } /** * Show ads * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function ads() { $client = $this->facebookClient; $accountId = 'act_12345678'; return view('ads', [ 'ads' => $client->account($accountId)->ads(), ]); } }