Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 727 Bytes
<?php
namespace App\ReadModels;
use App\Exceptions\WriteOperationIsNotAllowedForReadModel;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
abstract class ReadModel extends Model
{
public $incrementing = false;
protected function performInsert(Builder $query)
{
throw new WriteOperationIsNotAllowedForReadModel();
}
protected function performUpdate(Builder $query)
{
throw new WriteOperationIsNotAllowedForReadModel();
}
protected function performDeleteOnModel()
{
throw new WriteOperationIsNotAllowedForReadModel();
}
public function truncate()
{
throw new WriteOperationIsNotAllowedForReadModel();
}
}
You can’t perform that action at this time.