PHPackages                             tohur/bookings-plugin - 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. tohur/bookings-plugin

ActiveWinter-plugin[Utility &amp; Helpers](/categories/utility)

tohur/bookings-plugin
=====================

Bookings plugin for WinterCMS

032PHP

Since Jun 27Pushed 10mo agoCompare

[ Source](https://github.com/tohurtv/wn-bookings-plugin)[ Packagist](https://packagist.org/packages/tohur/bookings-plugin)[ RSS](/packages/tohur-bookings-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bookings plugin for WinterCMS
=============================

[](#bookings-plugin-for-wintercms)

[![Build Status](https://camo.githubusercontent.com/88d2c03b62ecf3046f91a4fc98eb2165da8b1f6cd5fd79feab1241b0047c54b5/68747470733a2f2f7472617669732d63692e6f72672f746f68757274762f776e2d626f6f6b696e67732d706c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tohurtv/wn-bookings-plugin)[![Codacy](https://camo.githubusercontent.com/726e2574a2f2c45da7ce22bc5c46b19fe01ca7a65fec95fc19da4b7dfef5f976/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f64343634323031383563393034366462383230386162313664333538613064332e737667)](https://www.codacy.com/app/tohurtv/wn-bookings-plugin)[![Code Coverage](https://camo.githubusercontent.com/53cf400840a5a88247cfcf0ef2f4ba216f48dbe00fd5cbd20217fc12ac6cb5aa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f68757274762f776e2d626f6f6b696e67732d706c7567696e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tohurtv/wn-bookings-plugin/?branch=master)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/tohurtv/wn-bookings-plugin/blob/master/LICENSE)

Provide booking form with bookings management.

Key features:

- bookings have **coloured statuses**, **bulk actions** and **fulltext search** to save your time
- nice and clean **dashboard widget**
- bookings **export** with status filtering
- booking can be created directly from the backend
- returning customers function

Technical features:

- shipped with **translations** and covered by **unit tests**
- booking form has **CSRF protection** and **multiple bots submissions protection**
- booking form has **AJAX sending** and also non-JS fallback
- overloadable **data seeding** for statuses

No other plugin dependencies. Tested with the latest stable WinterCMS build 420 (with Laravel 5.5).

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

[](#installation)

Returning Customers
-------------------

[](#returning-customers)

Plugin allow you to mark returning customers:

- set amount of previous bookings at **Backend &gt; Settings &gt; Bookings &gt; Bookings**
- at bookings listing, click at the list settings (the hamburger at the right corner) and check Returning
- it shows star at customers with more then non-canceled bookings

Admin confirmation
------------------

[](#admin-confirmation)

By default, plugin sends confirmation email to customer. But you can also turn on sending confirmation to different user (your customer, system administrator, etc). Follow these steps to turn this feature on:

- set admin email and name at **Backend &gt; Settings &gt; Bookings &gt; Bookings** at **Admin confirmation** tab
- turn the admin confirmation by switch
- system will send special template 'booking-admin', so feel free edit content of template at **Backend &gt; Settings &gt; Mail &gt; Mail templates**

Public facade
-------------

[](#public-facade)

You can use plugin's facade **tohur.bookings.facade** with some public methods as follows:

```
$facade = App::make('tohur.bookings.facade');
$facade->storeBooking(array $data);
$facade->getBookings();
$facede->getActiveBookings();
$facade->getReservedDates();
$facade->getBookingsByInterval(\Carbon\Carbon $from, \Carbon\Carbon $to);
$facade->isDateAvailable(\Carbon\Carbon $date);

```

Configuration
-------------

[](#configuration)

You can find some plugin configuration at the CMS backend (datetime format, booking length, time slot length, etc). But you can also set some values at plugin's config file. Config values are used when Settings value can not be found (and also because of backward compatibility with users using older version of plugin).

When you want to override default plugin's *config.php*, which is placed at plugin's folder */config*, just create file:

`/config/tohur/bookings/config.php`

And override values you want to change. Example of this file:

```
