- Can I use MyMakerBundle in a pure Laravel project without Symfony dependencies?
- No, MyMakerBundle requires Symfony 6.4+ and assumes Doctrine ORM, so it won’t work out-of-the-box in Laravel. You’d need to create a wrapper (e.g., custom Artisan command) to convert Twig templates to Blade and adapt Doctrine queries to Eloquent. Consider forking the bundle if you need deep Laravel integration.
- How do I generate a CRUD for a Laravel Eloquent model with this bundle?
- MyMakerBundle doesn’t natively support Eloquent, but you can generate a Symfony-style CRUD (using Doctrine) and manually replace the ORM logic in controllers/forms. Alternatively, build a custom command to bridge Doctrine queries to Eloquent or use the generated files as a reference to scaffold your own Laravel CRUD.
- Will the generated Twig templates work with Laravel Blade?
- No, Twig and Blade are incompatible. You’d need to manually convert Twig templates to Blade syntax or fork the bundle to replace Twig with Blade. The bundle doesn’t provide built-in Blade support, so this requires post-generation effort.
- Does MyMakerBundle support Laravel’s route prefixing (e.g., Route::prefix('admin'))?
- No, the bundle uses Symfony’s routing system with prefixed paths (e.g., `/admin`). For Laravel, you’d need to manually adjust the generated routes or write a wrapper to convert Symfony’s `path_prefix` to Laravel’s `Route::group` syntax.
- How do I add authorization (e.g., Laravel Policies) to the generated CRUD?
- The bundle supports Symfony Voters via `--with-voter`, but Laravel Policies won’t integrate directly. You’d need to replace the voter logic with Laravel’s `authorize()` checks in controllers or manually bind the generated controllers to Laravel’s auth system.
- What Laravel versions are compatible with MyMakerBundle?
- MyMakerBundle isn’t designed for Laravel—it’s Symfony 6.4+-only. If you’re using Laravel, you’ll need to adapt it via custom commands or templates. For Laravel 8/9/10, consider alternatives like Laravel Maker or custom scaffolding scripts.
- Are the generated CRUD files ready for production, or do I need to customize them?
- The files are functional but may require adjustments for production. Hardcoded folder/controller names, Twig templates, and Doctrine queries need Laravel-specific tweaks. Test thoroughly, especially for routing, auth, and template rendering.
- Can I generate tests for the CRUD like Symfony MakerBundle’s `--with-tests` flag?
- No, MyMakerBundle doesn’t include test generation. You’ll need to write Laravel-style tests (e.g., Pest or PHPUnit) manually for the generated controllers, routes, and forms.
- How do I configure the bundle to use custom template paths or namespaces?
- Use the `aldaflux_mymaker.yaml` config to override folders (e.g., `BackOffice`, `Frontoffice`) and routes. For Laravel, adjust paths to match your project structure (e.g., `resources/views` instead of `templates/`). Namespaces may need manual fixes in generated files.
- What are the best alternatives to MyMakerBundle for Laravel CRUD generation?
- For Laravel, consider native solutions like Laravel Maker (Artisan commands for CRUD), Laravel Nova, or FilamentPHP for admin panels. If you need Symfony-style scaffolding, evaluate forking MyMakerBundle or using Symfony MakerBundle directly in a hybrid setup.