PHPackages                             mchampaneri/timeslicer - 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. mchampaneri/timeslicer

ActiveLaravel-dependant[Utility &amp; Helpers](/categories/utility)

mchampaneri/timeslicer
======================

A plugable laravel package to generate time slots of particular time interval for any time range.

v0.1.4(9y ago)103.2k↓20.8%1opensourcePHP

Since Jun 27Pushed 8y ago3 watchersCompare

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

READMEChangelog (3)DependenciesVersions (6)Used By (0)

laravel-timeslicer
==================

[](#laravel-timeslicer)

Laravel 5 package for generating time slots for a time duration

Changes
-------

[](#changes)

- 'GUI support Removed '
- 'Enhanced backend support with new functions'
- 'Time Clock converter added'

Description
-----------

[](#description)

laravel-timeslicer is a s package that generates time slots of same length from starting time to ending time for a range of days,months or even years. You can create slots of differnt time lengths or/and differnt starting or/and ending time for differnt interval of days by changing the inputs accordingly.

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

[](#installation)

First Get It Through The Composer

```
  composer require mchampaneri/timeslice

```

Copy The ServiceProvider To config/app.php in **providers** array

```
   mchampaneri\timeslicer\TimeslicerServiceProvider::class

```

Copy The Facade To config/app.php in **aliases** array

```
   mchampaneri\timeslicer\TimeslicerServiceProvider::class

```

Second You have to publish the package

```
  php artisan vendor:publish

```

```
This command will publish all assets file need by the package at appropriate direcotries.

```

Third do Migrate

```
  php artisan migrate

```

```
Here migrate is neccesary because this package has its own table to manage timeslots and related data

```

After This Three Steps are ready to use the timeslicer

Setup
-----

[](#setup)

At first you have to set the config file of timeslicer. Define the name of your resource model, consumer model and namespace of your model files.

```
 Resource model : Model For Which You Want To Genreate The Time Slots
        for example doctors, resturant's table, class of school
 Consumer Model : Model Which are going to relate with Resource object throgh Timeslice
        for example patient, customer , subject

```

Here this names are **Case Sensitive** so add this name carefully.

In the second step you are ready to use this package where ever you want

Functions
---------

[](#functions)

```
MakeSlices($start_date, $end_date, $start_time, $end_time, $interval, $resource_id)

```

Function generates the unique time slices based on the date, start time and end time for start date to the end date here all variables are the fields of the table.

```
Book($consumer_id)

```

Here Consumer\_id is The id of a consumer object. This function will book the current timeslice for the consumer object which's id is passed as argument.

```
UnBook()

```

Unbook the current timeslice from the reservation

```
OfResource()

```

Returns the resource object which is related with the current timeslice.

```
ForConsumer()

```

Returns the consumer object which is related with the current timeslice.

```
SliceOfResource($id)

```

Returns the all time slices created for the particular resource.

```
SliceOfResourceDay($id, $on)

```

Returns the all time slices of the resource **on** the particular **date**.

```
BookedSliceOfResourceDay($id, $on)

```

```
Returns the all booked time slices of the resource **on** the particular **date**.

```

```
unBookedSliceOfResourceDay($id, $on)

```

```
Returns the all unbooked/free time slices of the resource **on** the particular **date**.

```
TimeConverter($string)
```
Returns the input of 12hr clock in 24hr clock output

```
rTimeConverter($string)
```
Returns the input of 24hr clock in 12hr clock with appropriate suffix ie am/pm

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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 ~1 days

Total

5

Last Release

3604d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69e8a6530530ef48eb119d9039ea82ec20808b2684bde7512ccbfa6ef640c707?d=identicon)[mchampaneri](/maintainers/mchampaneri)

---

Top Contributors

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

---

Tags

laravelTime ManagementTime slicerTime slot Plugin

### Embed Badge

![Health badge](/badges/mchampaneri-timeslicer/health.svg)

```
[![Health](https://phpackages.com/badges/mchampaneri-timeslicer/health.svg)](https://phpackages.com/packages/mchampaneri-timeslicer)
```

###  Alternatives

[highideas/laravel-users-online

This package will provide an online users management.

203113.2k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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