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);
}