PHP code example of michelmelo / laravel-gantt

1. Go to this page and download the library: Download michelmelo/laravel-gantt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

michelmelo / laravel-gantt example snippets


MichelMelo\LaravelGantt\GanttServiceProvider::class,


/**
 *  You'll pass data as an array in this format:
    $test_array = [
                      [
                        'label' => 'The item title',
                          'date' => [
                             [
                                 'start' => '2016-10-08',
                                 'end'   => '2016-10-14',
                                 'class' => '',
                             ],
                             [
                                 'start' => '2016-10-16',
                                 'end'   => '2016-10-19',
                                 'class' => '',
                             ]
                         ]
 
                     ]
                 ];
 */
 
$gantt = new MichelMelo\LaravelGantt\Gantt($test_array, array(
    'title'      => 'Demo',
    'cellwidth'  => 25,
    'cellheight' => 35
));

return view('gantt')->with([ 'gantt' => $gantt ]);
shell
php artisan vendor:publish --tag="gantt"
html
{!! $gantt !!}