1. Go to this page and download the library: Download steevanb/user-bundle 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 steevanb\UserBundle\Entity\AbstractUser;
class User extends AbstractUser
{
}
# src/Controller/SecurityController.php
class SecurityController extends steevanb\UserBundle\Controller\AbstractSecurityController
{
protected function createUser(): AbstractUser
{
# Create your User entity
return new User();
}
protected function createRegisterForm(): FormInterface
{
return new RegisterType();
}
protected function createRegisteredResponse(): Response
{
return new Response('User registered.');
}
}
# src/Form/Type/RegisterType.php
namespace App\Form\Type;
use steevanb\UserBundle\Form\Type\AbstractRegisterType;
class RegisterType extends AbstractRegisterType
{
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.