mohammadatif786/streampackage

A Laravel package for stream functionality

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

pkg:composer/mohammadatif786/streampackage

v1.0.3 2025-12-19 11:52 UTC

This package is auto-updated.

Last update: 2026-02-25 14:10:21 UTC


README

# StreamPackage for Laravel

A robust Laravel package to handle live streaming metadata, including stream management, chat toggles, and customizable routing.

## Features

- **Custom Routing**: Easily configurable stream prefixes.
- **Database Ready**: Includes migrations and models for stream management.
- **Automated Setup**: Single-command installation for config and assets.
- **Blade Views**: Pre-built templates for stream indexing and chat.

## Requirements

- PHP >= 8.0
- Laravel >= 9.0

## Installation

You can install the package via Composer:

```bash
composer require mohammadatif786/streampackage
```

After the package is installed, run the installation command to publish the config file and migrations:

```bash
php artisan stream:install
```

Finally, run your migrations to create the streams table:

```bash
php artisan migrate
```

## Configuration

After running the install command, you can customize the package behavior in `config/streampackage.php`:

```php
return [
    'prefix' => 'stream',      // Change the URL prefix
    'enable_chat' => true,     // Toggle the chat route
];
```

## Usage

### Routing

By default, the package provides the following routes:

- `your-app.com/stream` - Stream Index
- `your-app.com/stream/chat` - Stream Chat (if enabled)

### Using the Model

You can use the Stream model anywhere in your application:

```php
use Vendor\StreamPackage\Models\Stream;

$liveStreams = Stream::where('is_live', true)->get();
```

### Testing Data

To populate your database with test stream data, run the provided seeder:

```bash
php artisan db:seed --class="Vendor\StreamPackage\Database\Seeders\StreamSeeder"
```

```bash
php artisan vendor:publish --tag=streampackage-assets
```
## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This package is open-sourced software licensed under the [MIT license](LICENSE).