steelants/booking
最新稳定版本:0.0.8
Composer 安装命令:
composer require steelants/booking
包简介
Livewire booking calendar
README 文档
README
Created by: SteelAnts s.r.o.
Installation
composer require steelants/booking
Import assets
php artisan vendor:publish --tag=booking-assets
// app.scss @import "./vendor/booking/booking.scss";
// app.js import './vendor/booking/booking.js';
Usage
<?php namespace App\Livewire; use SteelAnts\Booking\Livewire\Calendar; class CustomCalendar extends Calendar { public function mount() { $this->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
统计信息
- 总下载量: 116
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-09