Looking to hire Laravel developers? Try LaraJobs

laravel-x-client maintained by abenevaut

Description
Laravel Http Client Infrastructure
Last update
2025/02/09 16:09 (dev-master)
License
Links
Downloads
10

Comments
comments powered by Disqus

laravel-x-client

Installation

You can install the package via composer:

composer require abenevaut/laravel-x-client

Add x service to your config/services.php file:

'x' => [
    'baseUrl' => env('X_URL', 'https://api.x.com/2'), // x API URL
    'client_id' => env('X_CLIENT_ID'), // Your x client id
    'client_secret' => env('X_CLIENT_SECRET'), // Your x client secret
    'debug' => env('X_DEBUG', false), // Debug mode
],

Usage

use abenevaut\X\Facades\X;

X::getClient(): XClient; // Get the x client
X::countFollowers(string $account): int; // Get the number of followers of an account, like @abenevaut