PHPackages                             claraleigh/autotweet-for-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. claraleigh/autotweet-for-laravel

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

claraleigh/autotweet-for-laravel
================================

Auto tweets for Laravel using OAuth

v0.0.5(2y ago)012.6k↑74.3%[7 PRs](https://github.com/ClaraLeigh/autotweet-for-laravel/pulls)MITPHPPHP ^8.2CI passing

Since May 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ClaraLeigh/autotweet-for-laravel)[ Packagist](https://packagist.org/packages/claraleigh/autotweet-for-laravel)[ Docs](https://github.com/claraleigh/autotweet-for-laravel)[ GitHub Sponsors](https://github.com/ClaraLeigh)[ RSS](/packages/claraleigh-autotweet-for-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (16)Versions (11)Used By (0)

Auto tweets for Laravel using OAuth
===================================

[](#auto-tweets-for-laravel-using-oauth)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01803876378bac1d093080dbee2b0dcdb2c1928a389174902b8bd8b7310b7af8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c6172616c656967682f6175746f74776565742d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/claraleigh/autotweet-for-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c6318bf65c368d8da0a323c2ec38d28bfbecdc4383c2e9cbc487b23009faa7f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636c6172616c656967682f6175746f74776565742d666f722d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/claraleigh/autotweet-for-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5baabfc4dc8fc9fbb67e4e734b7b62e995addd0b72ebc05977587180ae2cba1d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636c6172616c656967682f6175746f74776565742d666f722d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/claraleigh/autotweet-for-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/26aaf8066956411a9dc5aef14b3b69dd810dde4488245e0a9e1de1fc6ff4544e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c6172616c656967682f6175746f74776565742d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/claraleigh/autotweet-for-laravel)

This package provides a Twitter channel for Laravel notifications, allowing you to send tweets from your application.

Support us
----------

[](#support-us)

Hi there! If you're using this package, please consider supporting me on [GitHub Sponsors](https://github.com/sponsors/ClaraLeigh). It would mean a lot to me.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require claraleigh/autotweet-for-laravel
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="autotweet-for-laravel-migrations"
php artisan migrate
```

Update your user model's casts to include the `twitter_token` field:

```
$casts = [
    // Existing casts
    'twitter_token' => 'object',
];
```

You can publish the config file with:

```
php artisan vendor:publish --tag="autotweet-for-laravel-config"
```

Usage
-----

[](#usage)

Update your Notification file's `via` method to include the Twitter channel:

```
public function via(object $notifiable): array
{
    return [TwitterChannel::class];
}
```

Add a `toTwitter` method to your Notification file:

```
public function toTwitter($notifiable): TwitterMessage
{
    $post = (new TwitterStatusUpdate(
        __('Come see visit profile :url ❤️', ['url' => 'https://google.com/'])
    ));

    // Optional: Add an image to the tweet
    $post->withImage('path/to/image.jpg');

    return $post;
}
```

Alternative User Model
----------------------

[](#alternative-user-model)

To change the default user model, update the table used in the migration file and add the following code to your service provider:

```
AutotweetForLaravelServiceProvider::useUserModel(ExampleModel::class);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Clara Leigh](https://github.com/ClaraLeigh)
- [All Contributors](../../contributors)

Initially based on [Laravel Twitter Channel](https://github.com/laravel-notification-channels/twitter)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance59

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

736d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/751f5d923801c6d6a4cfbee2dd6ddb4d26c7849b9b1ae032467d579fd56070ed?d=identicon)[clara\_leigh](/maintainers/clara_leigh)

---

Top Contributors

[![ClaraLeigh](https://avatars.githubusercontent.com/u/2524209?v=4)](https://github.com/ClaraLeigh "ClaraLeigh (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

laraveloauth2twitterxlaraveltwitterClara Leighautotweet-for-laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/claraleigh-autotweet-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/claraleigh-autotweet-for-laravel/health.svg)](https://phpackages.com/packages/claraleigh-autotweet-for-laravel)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[spatie/laravel-passkeys

Use passkeys in your Laravel app

444494.4k16](/packages/spatie-laravel-passkeys)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
