PHPackages                             moonshiner/safe-queuing - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. moonshiner/safe-queuing

ActiveLibrary[Queues &amp; Workers](/categories/queues)

moonshiner/safe-queuing
=======================

Package to manage bookings and reservations for timeslots

1.0.0(5y ago)010MITPHPPHP ^7.1

Since Mar 15Pushed 5y ago2 watchersCompare

[ Source](https://github.com/moonshiner-agency/safe-queuing)[ Packagist](https://packagist.org/packages/moonshiner/safe-queuing)[ Docs](https://github.com/moonshiner/safe-queuing)[ RSS](/packages/moonshiner-safe-queuing/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Safe Queuing | manage timeslots and limit reservations
==============================================================

[](#laravel-safe-queuing--manage-timeslots-and-limit-reservations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bcaa246b75db7b058ce54feb36b81602b1dd901e6f5e9de2f1a331daed3737f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6f6e7368696e65722f736166652d71756575696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/moonshiner/safe-queuing)[![Total Downloads](https://camo.githubusercontent.com/482f7246bc25f5402cde11cdbb5afcfa9af4c661ca640d612528608b0c73574f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6f6e7368696e65722f736166652d71756575696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/moonshiner/safe-queuing)

This package helps you to attach timeslot and reservation capabilities to your existing Eloquent Models in Laravel.

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

[](#installation)

You can install the package via composer:

```
composer require moonshiner/safe-queuing
```

You can use the package for timeslot calculation only. To use the reservation capabilities of the package you need to publish the migrations. If you want to change the table name publishing the config is necessary as well. To run the publish command you need to add the Service Provider:

```
// config/app.php
'providers' => [
    // ...
    Moonshiner\SafeQueuing\SafeQueuingServiceProvider::class,
];
```

If you want to specify a custom table name, you'll need to publish and edit the configuration file:

```
php artisan vendor:publish --provider="Moonshiner\SafeQueuing\SafeQueuingServiceProvider" --tag="config"
```

Publishing and running the migrations for the usage of reservations:

```
php artisan vendor:publish --provider="Moonshiner\SafeQueuing\SafeQueuingServiceProvider" --tag="migrations"
php artisan migrate
```

Usage
-----

[](#usage)

You can simply add timeslots to your existing Model via the `HasTimeslots` Trait.

```
use Moonshiner\SafeQueuing\HasTimeslots;

//...

class Event extends Model
{
    use HasTimeslots;
```

To better configure the contraints for the timeslots you can add the following functions to your model to configure when timeslots are available:

```
public function timeslotStartDate(){
    return \Carbon\Carbon::now();
}
public function timeslotEndDate(){}
public function timeslotStartTime(){}
public function timeslotEndTime(){}
public function timeslotDuration(){}
public function timeslotBreak(){}
public function timeslotAvailableDays(){}
public function timeslotExcludedDates(){}
public function timeslotIncludedDates(){}
public function timeslotExcludedTimes(){}
```

To show all the timeslots available you can use:

```
$event = Event::first();

dd($event->timeslots());
```

To show all the reservations run:

```
$event = Event::first();

dd($event->reservations);
```

You can filter Timeslots

```
use Carbon\Carbon;
$event = Event::first();

// timeslots after some date
dd($event->timeslots()->findSlot(['start'=>Carbon::now(), 'end'=>Carbon::now()->addMinutes('30')]));

// only timeslots on a specific date
dd($event->timeslots()->onDay(Carbon::today()));

// timeslots after some date
dd($event->timeslots()->afterDate(Carbon::yesterday()));

// timeslots that end before given time
dd($event->timeslots()->beforeDate(Carbon::tomorrow()));
```

To add a reservations run:

```
$event = Event::first();
$timeslot = $event->timeslots()->first();

$event->reservations()->create([
    'details' => 'Person specific data',
    'timeslot' => $timeslot
]);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Florian Bauer](https://github.com/flobauer)
- [Raphael Fleischmann](https://github.com/raphaelflash)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1881d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bd28c0604ec81f37955f95b5aceb19f89b89b7c168725a2d0425d2529179407?d=identicon)[moonshiner](/maintainers/moonshiner)

---

Top Contributors

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

---

Tags

moonshinersafe-queuing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moonshiner-safe-queuing/health.svg)

```
[![Health](https://phpackages.com/badges/moonshiner-safe-queuing/health.svg)](https://phpackages.com/packages/moonshiner-safe-queuing)
```

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[illuminate/bus

The Illuminate Bus package.

6043.8M407](/packages/illuminate-bus)[stancl/jobpipeline

Turn any series of jobs into Laravel listeners.

1226.6M10](/packages/stancl-jobpipeline)[prwnr/laravel-streamer

Events streaming package for Laravel that uses Redis 5 streams

110196.9k1](/packages/prwnr-laravel-streamer)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[saeedvaziry/laravel-async

Run asynchronous code in Laravel without waiting for results

15310.0k](/packages/saeedvaziry-laravel-async)

PHPackages © 2026

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