for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Salah3id\Domains\Repository\Events;
use Illuminate\Database\Eloquent\Model;
use Salah3id\Domains\Repository\Contracts\RepositoryInterface;
/**
* Class RepositoryEventBase
* @package Salah3id\Domains\Repository\Events
* @author Anderson Andrade <[email protected]>
*/
abstract class RepositoryEventBase
{
* @var Model
protected $model;
* @var RepositoryInterface
protected $repository;
* @var string
protected $action;
* @param RepositoryInterface $repository
* @param Model $model
public function __construct(RepositoryInterface $repository, Model $model = null)
$this->repository = $repository;
$this->model = $model;
}
* @return Model|array
public function getModel()
return $this->model;
* @return RepositoryInterface
public function getRepository()
return $this->repository;
* @return string
public function getAction()
return $this->action;