1. Go to this page and download the library: Download appaydin/pd-user 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/ */
// src/Entity/User.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Pd\UserBundle\Model\User as BaseUser;
/**
* @ORM\Table(name="user")
* @ORM\Entity
* @UniqueEntity(fields="email", message="email_already_taken")
*/
class User extends BaseUser
{
public function __construct()
{
parent::__construct();
}
}
// src/Entity/Group.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Pd\UserBundle\Model\Group as BaseGroup;
/**
* @ORM\Table(name="user_group")
* @ORM\Entity
* @UniqueEntity(fields="name", message="group_already_taken")
*/
class Group extends BaseGroup
{
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.