2017 © Pedro Peláez
 

laravel-dependant timeslicer

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

image

mchampaneri/timeslicer

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

  • Saturday, December 9, 2017
  • by mchampaneri
  • Repository
  • 3 Watchers
  • 6 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

laravel-timeslicer

Laravel 5 package for generating time slots for a time duration, (*1)

Changes

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

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., (*2)

Installation

First Get It Through The Composer composer require mchampaneri/timeslice, (*3)

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, (*4)

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., (*5)

Third do Migrate php artisan migrate Here migrate is neccesary because this package has its own table to manage timeslots and related data, (*6)

After This Three Steps are ready to use the timeslicer, (*7)

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., (*8)

 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., (*9)

In the second step you are ready to use this package where ever you want, (*10)

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., (*11)

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., (*12)

UnBook() Unbook the current timeslice from the reservation, (*13)

OfResource() Returns the resource object which is related with the current timeslice., (*14)

ForConsumer() Returns the consumer object which is related with the current timeslice., (*15)

SliceOfResource($id) Returns the all time slices created for the particular resource., (*16)

SliceOfResourceDay($id, $on) Returns the all time slices of the resource on the particular date., (*17)

BookedSliceOfResourceDay($id, $on) Returns the all booked time slices of the resource on the particular date., (*18)

unBookedSliceOfResourceDay($id, $on) Returns the all unbooked/free time slices of the resource on the particular date., (*19)

```
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

The Versions

09/12 2017

dev-master

9999999-dev

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

  Sources   Download

OpenSource

by Manish

laravel time slicer time management time slot plugin

29/06 2016

v0.1.4

0.1.4.0

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

  Sources   Download

OpenSource

by Manish

laravel time slicer time management time slot plugin

28/06 2016

v0.1.0

0.1.0.0

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

  Sources   Download

OpenSource

by Manish

laravel time slicer time management time slot plugin

28/06 2016

v0.0.3

0.0.3.0

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

  Sources   Download

OpenSource

by Manish

laravel time slicer time management time slot plugin

28/06 2016

v0.0.2

0.0.2.0

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

  Sources   Download

OpenSource

The Requires

 

by Manish

laravel time slicer time management time slot plugin

27/06 2016

v0.0.1

0.0.1.0

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

  Sources   Download

OpenSource

by Manish