public function entityCreated(RepositoryContract $repository, $entity)
    {
        $clearOn = $repository->getContainer('config')->get('rinvex.repository.cache.clear_on');

        if ($repository->isCacheClearEnabled() && in_array('create', $clearOn)) {
            $repository->forgetCache();
        }
    }
public function entityCreated(RepositoryContract $repository, $entity)
    {
        $clearOn = $repository->getContainer('config')->get('rinvex.repository.cache.clear_on');

        if ($repository->isCacheClearEnabled() && in_array('create', $clearOn)) {
            $repository->forgetCache();
        }
    }
public function entityCreated ( RepositoryContract $ repository , $ entity ) { $ clearOn = $ repository -> getContainer ( 'config' ) -> get ( 'rinvex.repository.cache.clear_on' ) ; if ( $ repository -> isCacheClearEnabled ( ) && in_array ( 'create' , $ clearOn ) ) { $ repository -> forgetCache ( ) ; } }
Listen to entities created.

@param \Rinvex\Repository\Contracts\RepositoryContract $repository
@param mixed                                           $entity

@return void
Listen to entities created .