Skip to content

ICreateModel

The ICreateModel interface defines the methods necessary for model creation.

Code

php
<?php

namespace Oscabrera\ModelRepository\Contracts\Resources;

use Illuminate\Database\Eloquent\Model;

/**
 * Interface IEntityRead
 *
 * This interface defines a method for reading a record from the database based on the given ID.
 */
interface IReadModel
{
    /**
     * Reads a record from the database based on the given ID.
     */
    public function read(string $id): Model;
}

Released under the MIT License.