ratno / calendar-1

A complete Laravel Nova Ant Vue Calendar Card ready to work out of the box

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Voidfire Calendar

A complete Laravel Nova Ant Vue Calendar Card Ready to work out of the box Laravel Nova Agenda

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,
    ];
}

Buy Me A Coffee 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',
    ];
}

About

A complete Laravel Nova Ant Vue Calendar Card ready to work out of the box


Languages

Language:PHP 61.8%Language:Vue 33.6%Language:JavaScript 4.4%Language:CSS 0.2%