Download the PHP package sukohi/julius without Composer

On this page you can find all versions of the php package sukohi/julius. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package julius

Julius

A PHP package mainly developed for Laravel to manage calendar and events.
(This package was inspired by laravel-calendar ).
Thank you makzumi!
(This is for Laravel 5+. For Laravel 4.2)

Demo

Imgur

Installation

Add this package name in composer.json

"require": {
  "sukohi/julius": "2.*"
}

Execute composer command.

composer update

Register the service provider in app.php

'providers' => [
    ...Others...,  
    Sukohi\Julius\JuliusServiceProvider::class,
]

Also alias

'aliases' => [
    ...Others...,  
    'Julius'   => Sukohi\Julius\Facades\Julius::class
]

Usage

Minimal Way

echo \Julius::make();

with Options

See Methods for the details.

$events = [
    date('Y-m') .'-11 10:15:00' => ['Event 1', 'Event 2'],
    date('Y-m') .'-09 10:26:00' => ['Event 3', '<strong>Event 4</strong>'],
    date('Y-m') .'-07 14:12:23' => ['Event 5'],
    date('Y-m') .'-15 12:39:00' => ['Event 6'],
    date('Y-m') .'-17 25:50:00' => ['Event 7'], // You can use times over 24:00
];

$julius = \Julius::make();

$julius->setStartDate(\Request::get('base_date'))   //Set base date
    ->showNavigation(true)  // Show or hide the navigation
    ->showDayOfWeek(true)   // Show or hide the day of week for "week" or "day" mode.
    ->setMode(\Request::get('mode'))    // month, week or day
    ->setHours('8:10', '18:20') // Set the hour range for day and week mode. And you can use times over 24:00
    ->setClasses([  // Set classes
            'table' => 'table table-bordered', 
            'header' => 'table-header', 
            'time' => 'time', 
            'prev' => 'btn', 
            'next' => 'btn', 
            'day_label' => 'text-success', // You can use array like ['0' => 'sunday-class', '6' => 'saturday-class']
            'today' => 'text-danger',
            'year_month' => 'text-center', 
            'day' => 'text-muted', // You can use array like ['0' => 'sunday-class', '6' => 'saturday-class']
    ])
    ->setWraps([    // Set wrapers
            'event' => ['<p>', '</p>'], 
            'day' => ['<div>', '</div>'], 
            'date' => ['<span>', '</span>']
    ])
    ->setIcons([    // Set navigation icons (You can use HTML tags)
            'prev' => '<span class="glyphicon glyphicon-arrow-left"></span> Prev', 
            'next' => 'Next <span class="glyphicon glyphicon-arrow-right"></span>'
    ])
    ->setNavigationJsFunction('your_function_name')    // When using this method, the navigation icon link has onclick event. e.g) onclick="your_function_name(date)".
    ->setDayLabels(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])   // Set week day names
    ->setMonthLabels(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'])    // Set month names
    ->setInterval('+10 minutes')    // e.g.) +3 hours, +30 minutes etc...
    ->setEvents($events, $callback = function($events, $start_dt, $end_dt){ // Set events and its callback function(Callback is optional)

        $html = '<div>'. $start_dt->day .'</div>';
        $html .=  '<pre>'. print_r($events, true) .'</pre>';
        $html .= '<pre>'. print_r($start_dt, true) .'</pre>';
        $html .= '<pre>'. print_r($end_dt, true) .'</pre>';
        return $html;

    })
    ->setDateFormats([  // Set date formats
         'year_month' => 'm Y',
         'day' => 'w j',
         'time' => 'H:i'
     ]);
echo $julius->generate();

Methods

showNavigation($bool)

Show or hide the navigation

showDayOfWeek($bool)

Show or hide the day of week for week or day mode.

setMode($str)

To set calendar type. $str can be month, week or day.

setHours($start, $end)

To set the hour range for day and week mode.
You need to set time format like 00:00, 10:25 for $start and $end.
You can set times over 24:00

setClasses($array)

To set class values like the below.

setClasses([
    'table' => 'table table-bordered', 
    'header' => 'table-header', 
    'time' => 'time', 
    'prev' => 'btn', 
    'next' => 'btn', 
    'day_label' => 'text-success', // You also can set array like ['0' => 'sunday-class', '6' => 'saturday-class']
    'today' => 'text-danger',
    'year_month' => 'text-center', 
    'day' => 'text-muted', // You also can set array like ['0' => 'sunday-class', '6' => 'saturday-class']
])

setWraps($array)

To set wrapers.

setWraps([
    'event' => ['<p>', '</p>'], 
    'day' => ['<div>', '</div>'], 
    'date' => ['<span>', '</span>']
])

setIcons($array)

To set navigation icons. (You can use HTML tags)

setIcons([
    'prev' => '<span class="glyphicon glyphicon-arrow-left"></span> Prev', 
    'next' => 'Next <span class="glyphicon glyphicon-arrow-right"></span>'
])

setNavigationJsFunction($js_function_name)

When using this method, the navigation icon link has onclick event like the below.

onclick="js_function_name('2015-09')"

setDayLabels($array)

To set week day names

setDayLabels(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])

setMonthLabels($array)

To set month names.

setMonthLabels([
    'January', 
    'February', 
    'March', 
    'April', 
    'May', 
    'June', 
    'July', 
    'August', 
    'September', 
    'October', 
    'November', 
    'December'
])

setInterval($str)

To set time step. $str can be +3 hours, +30 minutes etc...

setEvents($events, $closure)

To set events and its callback(closure)

setEvents($events, function($event, $start_dt, $end_dt){  

    // Here you can make content for a specific event.
    return $start_dt->day .' - '. $start_dt .' - '. $end_dt;

})

// $start_dt and $end_dt are Carbon object.

setDateFormats($array)

To set date formats.
See here for other date symbols.

setDateFormats([
    'year_month' => 'm Y',
    'day' => 'w j',
    'time' => 'H:i'
])

License

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh


All versions of julius with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sukohi/julius contains the following files

Loading the files please wait ....