Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/steelants/livewire-booking


https://github.com/steelants/livewire-booking

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# Livewire Booking Calendar

### Created by: [SteelAnts s.r.o.](https://www.steelants.cz/)
[![Total Downloads](https://img.shields.io/packagist/dt/steelants/booking.svg?style=flat-square)](https://packagist.org/packages/steelants/booking)

## Installation
```bash
composer require steelants/booking
```

### Import assets
```bash
php artisan vendor:publish --tag=booking-assets
```

```scss
// app.scss
@import "./vendor/booking/booking.scss";
```

```js
// app.js
import './vendor/booking/booking.js';
```

## Usage
```php
renderType = 'freehand';
$this->dateFrom = date('Y-m-d', strtotime('today'));
$this->dateTo = date('Y-m-d', strtotime('+7 days'));
$this->selectedDay = date('Y-m-d', strtotime('today'));

// required action
$this->init();
}

protected function loadSlots()
{
// demo
return [
[
'datetime_from' => date('Y-m-d 12:00:00', strtotime('today')), // datetime string
'datetime_to' => date('Y-m-d 15:30:00', strtotime('today')), // datetime string
'status' => 'available', // available, reserved, partially-avilable
'text' => 'test free', // display text
],
[
'datetime_from' => date('Y-m-d 09:00:00', strtotime('today')), // datetime string
'datetime_to' => date('Y-m-d 11:15:00', strtotime('today')), // datetime string
'status' => 'reserved', // available, reserved, partially-avilable
'text' => 'test reserved', // display text
],
];
}
}
```

## Contributors


## Other Packages
[steelants/laravel-auth](https://github.com/steelants/laravel-auth)

[steelants/laravel-boilerplate](https://github.com/steelants/Laravel-Boilerplate)

[steelants/datatable](https://github.com/steelants/Livewire-DataTable)

[steelants/form](https://github.com/steelants/Laravel-Form)

[steelants/modal](https://github.com/steelants/Livewire-Modal)

[steelants/laravel-tenant](https://github.com/steelants/Laravel-Tenant)