PHP code example of dekeysoft / yii2-domain

1. Go to this page and download the library: Download dekeysoft/yii2-domain library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dekeysoft / yii2-domain example snippets



$repository = new UserRepository();
$entity = $repository->findOneWithPk(1);
// do some manipulations with entity
$repository->validateAndSave($entity);


$repository = new UserRepository();
$entity = $repository->find()
		->active()
		->withoutEmail()
		->one();
// do some manipulations with entity
$repository->delete($entity);
bash
composer