This project is a simple website which use symfony elements to make a user system. It cover some different things :
- Authentication
- Registration
- Logout
- Remember me
- Administration (to use roles and access restrictions)
- PHP 7.2.5 or more;
- more on needs of symfony.
Clone the project :
$ git clone https://github.com/aloyonnet/symfony-auth.git
Create the .env file:
$ cp .env.example .env
Then, install the dependencies:
$ composer install
Create the link with the database:
/.env
$ APP_ENV=dev
$ DATABASE_URL=...
We will now create the database and all the columns :
//create the database
$ php bin/console doctrine:database:create
//generate the migration
$ php bin/console make:migration
//execute the migration
$ php bin/console doctrine:migrations:migrate
For the default users, you will need to execute the fixtures :
$ php bin/console doctrine:fixtures:load
for non production use, you can launch a server (with https://localhost:8000 by default) using :
$ cd projet/
$ symfony serve
If symfony binary is not installed, you can replace the command with:
php -S localhost:8000 -t public/