<?php

namespace Seka\Vzdelavanie\Models\Kniznica;

use Illuminate\Database\Eloquent\Model;

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

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

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

    /**
     * @param string      $childType
     * @param mixed       $value
     * @param string|null $field
     *
     * @return \Illuminate\Database\Eloquent\Model|void|null
     */
    public function resolveChildRouteBinding($childType, $value, $field)
    {
        // TODO: Implement resolveChildRouteBinding() method.
    }
}
