voidfire / calendar
A Laravel Nova card.
Installs: 94
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 2
Open Issues: 1
pkg:composer/voidfire/calendar
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2020-05-22 16:09:59 UTC
README
A complete Laravel Nova Ant Vue Calendar Card Ready to work out of the box

Getting Started
Requirements
QuickStart
composer require voidfire/calendar
php artisan vendor:publish --tag=events-manager-migrations --force
php artisan migrate
To setup the card, you must register the card with Nova. This is typically done in the cards method of the NovaServiceProvider.
// in app/Providers/NovaServiceProvider.php
public function cards()
{
return [
// ...
new \Voidfire\Calendar\Calendar,
];
}
The package will create for you the needed entities for the calendar Events
create_events_table.php migration file:
public function up()
{
Schema::create('events', function (Blueprint $table) {
$table->increments('id');
$table->text('title');
$table->dateTime('start_date')->nullable();
$table->dateTime('end_date')->nullable();
$table->timestamps();
});
}
App\Nova\Event.php resource:
public function fields(Request $request)
{
return [
ID::make()->sortable(),
Text::make('Title')->rules('required'),
DateTime::make('From', 'start_date'),
DateTime::make('To', 'end_date'),
];
}
App\Event.php model:
class Event extends Model
{
protected $dates = [
'start_date',
'end_date',
];
}