定制 skecskes/calendar 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skecskes/calendar

Composer 安装命令:

composer require skecskes/calendar

包简介

Laravel 5 Flexible Calendar

README 文档

README

Flexible Calendar for Laravel 5, supports Month, Week and Day Views and multiple events per date.

To change the view type dynamically, pass in a GET variable called 'cv' (calendar view) with either a 'week' or 'day' value. Day and Week views are split into 30 minute interval rows.

For Laravel 4 use makzumi/laravel-calendar

Installation instructions for Laravel 5:

Add this to "require" section in composer.json:

"skecskes/calendar": "0.2.*"

After that run a composer update, and then in /config/app.php add this line to providers array:

'providers' => array(
	...,
		Skecskes\Calendar\CalendarServiceProvider::class,
	),

If you want to change some of the default values of calendar, first publish the configuration with

php artisan vendor:publish

This will create new configuration file in your app config/calendar.php where you can overwrite default values.

Usage

To use, create a new Calender instance and generate it, below you'll find several options to customize it as well:

	$events = array(
		"2014-04-09 10:30:00" => array(
			"Event 1",
			"Event 2 <strong> with html</stong>",
		),
		"2014-04-12 14:12:23" => array(
			"Event 3",
		),
		"2014-05-14 08:00:00" => array(
			"Event 4",
		),
	);

	$cal = Skecskes\Calendar\Facades\Calendar::make(); // create instance

	/**** OPTIONAL METHODS ****/
	$cal->setDate(Input::get('cdate')); //Set starting date
	$cal->setBasePath('/dashboard'); // Base path for navigation URLs
	$cal->showNav(true); // Show or hide navigation
	$cal->setView(Input::get('cv')); //'day' or 'week' or null
	$cal->setStartEndHours(8,20); // Set the hour range for day and week view
	$cal->setTimeClass('ctime'); //Class Name for times column on day and week views
	$cal->setEventsWrap(array('<p>', '</p>')); // Set the event's content wrapper
	$cal->setDayWrap(array('<div>','</div>')); //Set the day's number wrapper
	$cal->setNextIcon('>>'); //Can also be html: <i class='fa fa-chevron-right'></i>
	$cal->setPrevIcon('<<'); // Same as above
	$cal->setDayLabels(array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')); //Label names for week days
	$cal->setMonthLabels(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')); //Month names
	$cal->setDateWrap(array('<div>','</div>')); //Set cell inner content wrapper
	$cal->setTableClass('table'); //Set the table's class name
	$cal->setHeadClass('table-header'); //Set top header's class name
	$cal->setNextClass('btn'); // Set next btn class name
	$cal->setPrevClass('btn'); // Set Prev btn class name
	$cal->setEvents($events); // Receives the events array
	/**** END OPTIONAL METHODS ****/

	echo $cal->generate() // Return the calendar's html;

skecskes/calendar 适用场景与选型建议

skecskes/calendar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.32k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2016 年 06 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「calendar」 「events」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 skecskes/calendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 skecskes/calendar 我们能提供哪些服务?
定制开发 / 二次开发

基于 skecskes/calendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-06-23