<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Terminy\Entities\Dtos;

use Illuminate\Database\Eloquent\Model;

/**
 * Trait ModelToDTOTrait
 *
 * @package Seka\Portal\Modul\Terminy\Entities\Dtos
 */
trait ModelToDTOTrait
{
    /**
     * @param \Illuminate\Database\Eloquent\Model $model
     *
     * @return static
     */
    public static function fromModel(Model $model)
    {
        return new static($model->toArray());
    }
}
