Download the PHP package shirokovnv/innkeeper without Composer

On this page you can find all versions of the php package shirokovnv/innkeeper. 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 innkeeper

Innkeeper

ci.yml Latest Version on Packagist Total Downloads

The library for your next Laravel booking app.

Supported Laravel versions: >=9.x

Installation

  1. Install package via composer

  2. Run migrations

  3. Done!

Usage

Add bookable functionality to your eloquent model

That's basically it. Now your rooms can be booked.

Checking opportunity for the booking:

The Innkeeper service provides functionality to check wether its possible to book something in a date range:

Create a new booking

Creating a new booking is straight forward and could be done the following way:

Or if you like facades, you can do it like this:

Notes:

Why we need booking_hash and what is it ?

  • The hash is a field in a database with a unique constraint
  • It serves purpose to prevent some duplicate bookings without explicitly locking tables

Let me show you and example:

Suppose, you have a few visitors on your booking site. And all the visitors asks for booking the same room at a time.

In this particular case, you probably need to assign the room to the first customer and notify others the room already booked.

You can do it by these simple steps:

  1. Define hash function

  2. In your business logic code

This example covers only the case, when you have deterministic booking schedule without intersections. Like this:

If you have some intersections, like:

you may still have a problem with duplicates.

Of course, you can check the availability of the room:

But it doesn't guarantee resolving concurrent requests for your schedule.

So, please, let me know what can be a solution if it is your case.

Query bookings

Delete bookings

Change log

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details and a todolist.

Security

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

Credits

License

MIT. Please see the license file for more information.


All versions of innkeeper with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/database Version ~9|~10
illuminate/support Version ~9|~10
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 shirokovnv/innkeeper contains the following files

Loading the files please wait ....