MyMakerBundle is a Symfony bundle for generating custom CRUDs (BackOffice, FrontOffice, User), WebProfiler Data Collectors, and Symfony bundle skeletons.
Install the bundle in your Symfony project (in development mode) via Composer:
composer require --dev aldaflux/my-maker-bundle
To configure default output folders and route prefixes, you can create or edit config/packages/aldaflux_mymaker.yaml:
my_maker:
backoffice:
folder:
controller: BackOffice
template: backoffice
route:
name_prefix: admin_
path_prefix: admin
frontoffice:
folder:
controller: Frontoffice
template: frontoffice
make:crud:admin)Generates a complete administration CRUD (Controller, FormType, and Twig views) for a given Doctrine entity class.
php bin/console make:crud:admin EntityName
--with-voter option:
Adds security checks (is_granted) using Symfony Voters in the controller and Twig views.
php bin/console make:crud:admin EntityName --with-voter
Generated files:
src/Controller/BackOffice/EntityNameController.phpsrc/Form/EntityNameType.phptemplates/backoffice/entity_name/index.html.twigtemplates/backoffice/entity_name/show.html.twigtemplates/backoffice/entity_name/new.html.twigtemplates/backoffice/entity_name/edit.html.twigtemplates/backoffice/entity_name/_form.html.twigtemplates/backoffice/entity_name/_delete_form.html.twigmake:front:show)Generates read-only views (list and details) and controller for the FrontOffice.
php bin/console make:front:show EntityName
Generated files:
src/Controller/Frontoffice/EntityNameController.phptemplates/frontoffice/entity_name/index.html.twigtemplates/frontoffice/entity_name/show.html.twigmake:crud:user)Generates a CRUD specifically designed for managing user accounts (password hashing, password change, roles management, user profile).
php bin/console make:crud:user
--with-voter option:
Adds voter security checks (is_granted('view', user), is_granted('edit', user), etc.) in views and controllers.
php bin/console make:crud:user --with-voter
make:data:collector)Generates a custom DataCollector for the Symfony WebProfiler, including its SVG icon and Twig template.
php bin/console make:data:collector CustomCollector
make:aldalflux:bundle)Generates the directory tree and structure for a new full Symfony bundle (Configuration classes, DI Extension, composer.json, services.yml).
php bin/console make:aldalflux:bundle
How can I help you explore Laravel packages today?