1. Go to this page and download the library: Download nh/bs-component 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/ */
nh / bs-component example snippets
php artisan vendor:publish --tag=bs-component
/**
* Get the events for the calendar
*
* @param \Illuminate\Http\Request $request
* @return Illuminate\Database\Eloquent\Collection
*/
public function loadEventPerMonth(Request $request)
{
// Define the events for the month
$events[] = [
'title' => 'My event',
'content' => 'The description',
'color' => 'primary',
'days' => [14,15,16]
];
$events[] = [
'title' => 'Another event',
'content' => 'The description',
'color' => 'danger',
'days' => [28]
];
// Retune the JSON
return $events;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.