PHPackages                             aifnet-com/fal-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aifnet-com/fal-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aifnet-com/fal-laravel
======================

FAL Laravel integration library

v1.0.23(1mo ago)047MITPHPPHP ^8.0

Since Oct 7Pushed 1mo agoCompare

[ Source](https://github.com/Aifnet-com/fal-laravel-lib)[ Packagist](https://packagist.org/packages/aifnet-com/fal-laravel)[ RSS](/packages/aifnet-com-fal-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (25)Used By (0)

```
# FAL Laravel Integration Library

This Laravel package provides integration with [FAL AI](https://fal.ai) via queue-based endpoint execution, webhook handling, error tracking, and request management.

---

## 🚀 Installation

```bash
composer require aifnet-com/fal-laravel
```

---

⚙️ Environment Setup
--------------------

[](#️-environment-setup)

Add the following environment variables to your `.env` file:

```
FAL_KEY=your-fal-api-key
FAL_NGROK_URL_FOR_LOCALHOST=https://your-ngrok-url.io
```

- `FAL_KEY`: Your API key from
- `FAL_NGROK_URL_FOR_LOCALHOST`: Used in `local` environment to map the webhook route via ngrok

---

🔄 Queue Configuration
---------------------

[](#-queue-configuration)

**Important:** This package requires a working queue system to function properly.

Webhook processing is handled asynchronously via Laravel's queue system. Make sure you have:

1. Configured a queue driver in your `.env` (e.g., `redis`, `database`, `sqs`):

    ```
    QUEUE_CONNECTION=redis
    ```
2. A queue worker running:

    ```
    php artisan queue:work
    ```

Without an active queue worker, webhook events will not be processed.

---

🧱 Migrations
------------

[](#-migrations)

This package auto-loads its migrations.

Run:

```
php artisan migrate
```

Or publish them into your project:

```
php artisan vendor:publish --tag=fal-migrations
```

This will create the following tables:

- `fal_requests`
- `fal_endpoints`
- `fal_data`
- `fal_errors`

---

📡 Webhook Handling
------------------

[](#-webhook-handling)

The package registers this route automatically:

```
POST /fal/webhook
```

You don't need to manually define this. The controller handles incoming FAL webhook updates, finds the matching request, updates its status, and logs errors if applicable.

---

🧠 Submitting Requests
---------------------

[](#-submitting-requests)

To submit a request to a FAL endpoint:

```
use Aifnet\Fal\Models\FalRequest;

FalRequest::submit('your-endpoint-name', [
    'input_key' => 'value',
], [
    'user_id' => auth()->id(),
], FalRequest::TYPE_AUDIO);
```

---

🕒 Scheduled Command
-------------------

[](#-scheduled-command)

This package includes a command to fail stale requests:

```
php artisan fal:check-for-stuck-requests

```

It will:

- Fail requests older than 10 minutes
- Mark them as `STATUS_FAILED`
- Trigger a `FalWebhookArrived` event

### Add it to your schedule:

[](#add-it-to-your-schedule)

In `App\Console\Kernel.php`:

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('fal:check-for-stuck-requests')->everyFiveMinutes();
}
```

🛠 Laravel Compatibility
-----------------------

[](#-laravel-compatibility)

- Laravel 8, 9, 10, 11
- PHP &gt;= 8.0
- Auto-discovered Service Provider

---

📄 License
---------

[](#-license)

[MIT](LICENSE)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~7 days

Recently: every ~17 days

Total

24

Last Release

56d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2058ec926f119d23f52f12b86d3edffdd70a55d5d253b77a712a3356cd25139?d=identicon)[alexchakmakov](/maintainers/alexchakmakov)

---

Top Contributors

[![alexchakmakov](https://avatars.githubusercontent.com/u/129384773?v=4)](https://github.com/alexchakmakov "alexchakmakov (34 commits)")

### Embed Badge

![Health badge](/badges/aifnet-com-fal-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/aifnet-com-fal-laravel/health.svg)](https://phpackages.com/packages/aifnet-com-fal-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M861](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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