PHPackages                             iankibet/laravel-streamline - 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. [API Development](/categories/api)
4. /
5. iankibet/laravel-streamline

ActiveLibrary[API Development](/categories/api)

iankibet/laravel-streamline
===========================

A package that allows front end to interact with backend without the need for routes and controller

1.2.1(3mo ago)14.2k↓28.9%1MITPHP

Since Aug 21Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/iankibet/laravel-streamline)[ Packagist](https://packagist.org/packages/iankibet/laravel-streamline)[ RSS](/packages/iankibet-laravel-streamline/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (35)Used By (0)

Laravel Streamline
==================

[](#laravel-streamline)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a7610bf60fe5fc77c432169746a18cad72d21db16f4ce760efed8e24b19810ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69616e6b696265742f6c61726176656c2d73747265616d6c696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iankibet/laravel-streamline)[![Total Downloads](https://camo.githubusercontent.com/eecf93328d70464b8b395c1e0ef1214ab781b5e0a8f537bca8c66a8238e70718/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69616e6b696265742f6c61726176656c2d73747265616d6c696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iankibet/laravel-streamline)

`laravel-streamline` is a powerful backend package that allows your frontend (Vue/React) to interact directly with "Stream" classes in Laravel without the need for manual routes, controllers, or boilerplate API endpoints.

🚀 Key Features
--------------

[](#-key-features)

- **Zero Routes**: No need to define routes or controllers for every action.
- **Stateful Streams**: Initial arguments are persisted across subsequent action calls, allowing for stateful backend logic.
- **Dependency Injection**: Full support for Laravel's service container in constructors and methods.
- **Method Object Mapping**: Pass objects from the frontend that automatically populate `request()` data and map to positional parameters.
- **Security First**: Fine-grained permissions and validation via PHP attributes.
- **Privacy**: Automatically filters out internal methods and properties from the frontend.

📦 Installation
--------------

[](#-installation)

```
composer require iankibet/laravel-streamline
```

Publish the config file:

```
php artisan vendor:publish --tag=laravel-streamline
```

⚙️ Configuration
----------------

[](#️-configuration)

The default configuration looks like this:

```
return [
    'class_namespace' => 'App\\Streams',
    'class_postfix' => 'Stream',
    'route' => 'api/streamline',
    'middleware' => ['auth:sanctum'],
    'guest_streams' => [
        'auth/auth'
    ],
    // Hides these properties from the frontend
    'exclude_properties' => [
        'rules', 'isTesting', 'authenticatedUser', 'requestData', 'action'
    ]
];
```

🛠 Basic Usage
-------------

[](#-basic-usage)

### 1. Create a Stream class

[](#1-create-a-stream-class)

```
php artisan make:stream TaskStream
```

### 2. Implement your logic

[](#2-implement-your-logic)

```
namespace App\Streams;

use Iankibet\Streamline\Stream;
use Iankibet\Streamline\Attributes\Validate;
use Iankibet\Streamline\Attributes\Permission;

class TaskStream extends Stream
{
    public $taskId;
    public $task;

    /**
     * Arguments passed during initialization in Vue (useStreamline)
     * are automatically injected here and persisted for all future actions.
     */
    public function __construct($taskId = null)
    {
        $this->taskId = $taskId;
        if ($taskId) {
            $this->task = Task::find($taskId);
        }
    }

    #[Permission('view-tasks')]
    public function onMounted()
    {
        // This is called when the stream is initialized on the frontend
        return $this->toArray();
    }

    #[Validate(['status' => 'required|string'])]
    public function updateStatus($status)
    {
        // Positional parameters can also be passed from objects!
        // service.updateStatus({status: 'completed'}) works too.

        $this->task->update(['status' => $status]);
        return ['success' => true];
    }
}
```

🧙 Advanced Features
-------------------

[](#-advanced-features)

### Persistent State

[](#persistent-state)

When you initialize a stream on the frontend: `const { service } = useStreamline('task', 42);`

The argument `42` is sent to the backend. For every subsequent call to `service.someAction()`, the backend automatically re-instantiates `TaskStream(42)` before executing `someAction()`.

### Method Object Mapping

[](#method-object-mapping)

You can pass objects to methods from the frontend: `service.updateUser(123, { role: 'admin', note: 'Promoted' })`

On the backend:

```
public function updateUser($userId, $role) {
    // $userId = 123
    // $role = 'admin' (automatically unwrapped from the object)
    // request('note') = 'Promoted'
}
```

### Security &amp; Privacy

[](#security--privacy)

- **Filtered Output**: Only **public** properties are returned to the frontend.
- **Internal Protection**: Standard internal properties and all method names are automatically hidden from the frontend response payload to prevent leaking logic.
- **Attributes**: Use `#[Permission('...')]` and `#[Validate([...])]` for robust security.

🧪 Testing
---------

[](#-testing)

Test your streams directly from the CLI:

```
php artisan streamline:test-stream TaskStream
```

📄 License
---------

[](#-license)

MIT

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.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 ~28 days

Recently: every ~48 days

Total

20

Last Release

103d ago

### Community

Maintainers

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

---

Top Contributors

[![iankibet](https://avatars.githubusercontent.com/u/10730525?v=4)](https://github.com/iankibet "iankibet (17 commits)")[![timomch2](https://avatars.githubusercontent.com/u/33519345?v=4)](https://github.com/timomch2 "timomch2 (6 commits)")

### Embed Badge

![Health badge](/badges/iankibet-laravel-streamline/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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