sukohi/ceasar
Larablocks Analysis
sukohi/ceasar works with Laravel 5 (latest release 2.0.2, Jan 31, 2017), which reached end of life: no more fixes, even for security.
Laravel 4 in earlier releases.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Jan 31, 2017)
- 0 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jan 31, 2017.
- No releases in the last 12 months.
- First released: May 30, 2016.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.
| Install | |
|---|---|
composer require sukohi/ceasar |
|
| Latest Version: | 2.0.2 |
| Laravel: | 5 |
| Older releases: | 4 |
| License: | MIT |
| Last Updated: | Jan 31, 2017 |
| Links: | GitHub · Packagist |
Ceasar
A Laravel package to manage calendar easily.
(This is for Laravel 5+. For Laravel 4.2)
Installation
Execute composer command.
composer require sukohi/ceasar:2.*
Register the service provider in app.php
'providers' => [
...Others...,
Sukohi\Ceasar\CeasarServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'Ceasar' => Sukohi\Ceasar\Facades\Ceasar::class,
]
Usage
$ceasar = \Ceasar::make('2016-5', $time_zone = null);
$ceasar->firstDayOfWeek(0); // Optional: Which day is the first?
echo $ceasar->render(function($cal){
if($cal->isStart) {
$cal->view = '<table>';
} else if($cal->isEnd) {
$cal->view = '</table>';
} else if($cal->isStartRow) {
$cal->view = '<tr>';
} else if($cal->isEndRow) {
$cal->view = '</tr>';
} else if($cal->isHeader) {
$cal->view = '<td colspan="7">'. $cal->format('Y-m') .'</td>';
} else if($cal->isDayOfWeek) {
$cal->view = '<th>'. $cal->format('D') .'</th>';
} else if($cal->isDay) {
$cal->view = '<td>'. $cal->day .'</td>';
} else if($cal->isEmpty) {
$cal->view = '<td class="empty">'. $cal->day .'</td>';
}
return $cal;
});
About $cal
$cal is an instance of the class called Calendar which is extending Carbon.
So you can use $cal as well as Carbon instance like so.
if($cal->dayOfWeek == Carbon::SUNDAY) {
$cal->view = '<td class="sunday">'. $cal->day .'</td>';
} else if($cal->dayOfWeek == Carbon::SATURDAY) {
$cal->view = '<td class="saturday">'. $cal->day .'</td>';
} else {
$cal->view = '<td>'. $cal->day .'</td>';
}
License
This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.0.2 | ~5.0 | MIT | ||
| 2.0.1 | ~5.0 | MIT | ||
| 2.0.0 | ~5.0 | MIT | ||
| 1.0.1 | >=5.4.0 | 4.2.* | MIT | |
| 1.0.0 | >=5.4.0 | 4.2.* | MIT |