<?php

namespace Seka\Vzdelavanie\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Kategoria
 * @package Seka\Vzdelavanie\Models
 */
class Kategoria extends Model
{
    /**
     * @var string
     */
    protected $table = 'kategorie';

    /**
     * @var array
     */
    protected $fillable = [
        'nazov',
        'obrazok',
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function ucebnice()
    {
        return $this->hasMany(Ucebnica::class, 'kategoria_id', 'id');
    }
}
