Easy web admin comes by default with some basic entities:
- Contact
- Post
- Category
- Image
It's purpose is to be a CMS with very easy extensibility.
By Running this command:
bin/console easy:create-admin-object myNewEntityIt will create:
- Entity
- Form
- Service
- Repository
- Controller
So we have all we need to create, edit and delete our newly created entity. By default it will create a route on our /admin/myNewEntity
If we want to change it, just go to the controller: myNewEntityController.php and change the route.
You'll need the following software installed on your machine:
## Docker
Create docker-compose environment file
```bash
cp infra/docker/dist.env infra/local/.env
Change the environment variables if needed. Defaults may suit your needs.
Build the containers and start them
docker-compose up --build -ddocker exec -t easy-dbserver mysql -e "CREATE DATABASE IF NOT EXISTS easy"
docker exec -t easy-dbserver mysql -e "GRANT ALL ON easy.* TO 'easy'@'%' IDENTIFIED BY 'easy'"
docker exec -t easy-dbserver mysql -e "FLUSH PRIVILEGES"Copy Symfony env file (go back to root directory of the project)
cp dist.env .envInstall PHP vendors via composer.
docker exec -it easy-php composer installCreate DB schema
docker exec -it easy-php bin/console doctrine:schema:createBuild assets
docker exec -it easy-php yarn encore devLoad Fixtures
docker exec -it easy-php bin/console doctrine:fixtures:loadUpdate your /etc/host file:
echo "127.0.0.1 easy.loc" >> /etc/hostsOpen a browser and go to:
- http://easy.loc/admin User: admin@test.com Password: admin
Set pre-commit hook.
cp infra/git/hooks/pre-commit .git/hooks/pre-commit
chmod a+x .git/hooks/pre-commit