HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/blijegasten/blijegasten.be/app/Komma/Kms/Core/AbstractModelHandlerInterface.php
<?php declare(strict_types=1);

namespace App\Komma\Kms\Core;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;

interface AbstractModelHandlerInterface
{
    /**
     * Puts the values of attributes in an Eloquent model. And then saves that model.
     *
     * @param Model $model
     * @param Collection $attributes
     * @return Model
     */
    public function save(Model $model, Collection $attributes = null): Model;

    /**
     * Gets the values of an Eloquent model and passes them to a collection of attributes
     *
     * @param Model $model
     * @param Collection $attributes
     * @return Collection of loaded attributes
     */
    public function load(Model $model, Collection $attributes = null): Collection;

    /**
     * Destroys the appropriate related models for a given model.
     * Those related models must be the responsibility of this service
     *
     * @param Model $model
     */
    public function destroyForModel(Model $model);
}