Download the PHP package xisodev/working_hours without Composer

On this page you can find all versions of the php package xisodev/working_hours. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package working_hours

Working_hours from schedule.

Schedule is a package that helps tracking schedules for your models. If you have workers in a company, you can set schedules for them and see their availability though the time.

Inspiration

This package is inspired from Spatie's Opening Hours package, which uses a schedule but only statically, rather than binding it to a model. This gave me the idea of brining it closer to Eloquent Models than to the classic Class.

Installation

Install the package via Composer CLI:

For versions of Laravel that doesn't support package discovery, you should add this to your config/app.php file, in the providers array:

Publish the migration file and the config file.

Migrate the database.

Add the trait to your model.

Getting Started

To get stared, let's create a schedule for our user. It will be from Monday to Friday, between 8-12 and 13-18.

Let's say the user has its birthday on 1st March each year, so let's add this to an exclusions list. Adding to this, the first and the second day of Christmas is free for anyone, and let's add 1st May 2018 in our exclusions list too.

Note: 1st May 2018 will occur only once, it's not recurrent.

Checking for availability

You can check if the user has working hours on a certain day, date. Passing date also works with Carbon instance.

If there is an exclusion that day, it will return the correct value based on the schedule set that day:

Checking for availability at a certain time

You can also check availability for a certain time on a specific day.

Getting the amount of hours or minutes for a day

You can get the amount of hours or minutes scheduled for a day. Good for tracking workable hours, for example.

Deleting the schedule

If you plan to delete the user's schedule, you can do so by calling deleteSchedule().


All versions of working_hours with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 9.*
spatie/opening-hours Version ^2.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xisodev/working_hours contains the following files

Loading the files please wait ....