sgromada/symfony-crud-bundle

Provides a trait to rapidly create CRUD

1.0.0 2023-11-19 22:37 UTC

This package is auto-updated.

Last update: 2024-09-20 22:20:32 UTC


README

Example of use:

' #[Route('example', name: 'panel_example_')] class ExampleController extends AbstractController { use CrudTrait;

public function __construct(
    protected EntityManagerInterface $entityManager,
    protected string $class = Example::class,
    protected string $form = ExampleFormType::class,
    protected string $templatePath = 'example',
) {
}

} ''

Then create twig files in directory and call routes example/index.html.twig => panel_example_index example/show.html.twig => panel_example_show example/update.html.twig => panel_example_update example/create.html.twig => panel_example_create