Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Admin Crud Laravel Package

mwsimple/admin-crud

A Laravel package for quickly building admin CRUD interfaces, with scaffolding to generate the create, read, update, and delete screens your backend needs. Ideal for developers who want a head start on admin panels without hand-writing every resource.

View on GitHub
Deep Wiki
Context7

Getting Started

Reality check before you type composer require: mwsimple/admin-crud is a Symfony bundle (MWSimpleAdminCrudBundle), not a Laravel package. There is no service provider, no config/admin-crud.php, no artisan command. If your project is Laravel, the only thing you can take from it is the pattern (a generator that emits thin CRUD controllers on top of a fat base controller). If you're working in a legacy Symfony 3.x/4.x codebase, it can save you an afternoon of scaffolding.

Minimal steps in a Symfony project:

  1. composer require mwsimple/admin-crud — expect dependency resolution friction; it was last released 2019-04-26 and is pinned to an older Symfony/Doctrine/Twig era.
  2. Register the bundle: AppKernel.php (new MWSimple\Bundle\AdminCrudBundle\MWSimpleAdminCrudBundle()) on Symfony 3, or config/bundles.php on Symfony 4.
  3. Confirm the console command name and its arguments before guessing: bin/console list | grep -i crud. The generator is the whole point of the bundle — everything else is the base controller it extends.
  4. Have a Doctrine entity ready that is already mapped and has a repository (e.g. AppBundle:Post).

Where to look first, in this order:

  • Command/ — the generator; read its options (entity shortcut, bundle/target dir, whether it overwrites).
  • Controller/ — the base controller every generated controller extends. This is where list pagination, form handling, redirects, and delete logic live. If you only read one file, read this one.
  • Resources/views/ — the Twig templates you'll be overriding.
  • DependencyInjection/ — the config tree (bundle alias, template/layout settings).

First use case: point the generator at your simplest entity, get index / new / edit / delete actions and views in ~2 minutes, then strip out what you don't need. Treat the output as a scaffold you will immediately edit, not something you leave untouched.

If you're a Laravel developer on a Laravel app: don't install this. The equivalent day-to-day leverage is php artisan make:controller --resource --model=Post plus a generator package (Filament, Backpack, or a custom artisan command with stubs). The bundle's real idea — generated controllers extend a shared base so cross-cutting CRUD behavior lives in one place — maps 1:1 onto a BaseCrudController + artisan stub in Laravel.

Implementation Patterns

Generate, then extend — never edit the generator output blindly. The intended workflow is: generated controller is thin, and you customize by overriding protected methods on the base controller (repository selection, form type, redirect after save, query builder for the list) and by overriding Twig blocks. Keep a note of which controllers are "regenerated" and which you've forked by hand, otherwise the next generate run silently clobbers your customizations.

Secure before you generate. The generated routes are annotation-based on the controller itself. Put the whole thing behind an admin firewall / ROLE_ADMIN before it ever reaches staging — a scaffolded CRUD with delete actions is an open door. Verify with bin/console debug:router that the routes landed under the prefix you expect, not at the app root.

Customize the list via the query, not the template. The list action typically pulls from a repository/query builder. Filtering or scoping (e.g., only the current tenant's records) belongs in an overridden list method or a Doctrine query, not in a Twig {% if %}. This keeps pagination counts honest — filtering in the template breaks pagers and sort links.

Override views in the host app, not the vendor tree. Symfony resolves app-level template overrides by path convention (app/Resources/MWSimpleAdminCrudBundle/views/... on Symfony 3, templates/bundles/MWSimpleAdminCrudBundle/... on Symfony 4). Copy only the template you need, extend your own base layout from it, and clear the cache afterwards. Never edit vendor/ — the next composer update eats it.

Graduate controllers out of the scaffold. For simple lookup tables, the generated controller is fine forever. For anything with business rules, copy the generated file into your own controller namespace and make it standalone, so you're not coupled to an unmaintained base class.

Laravel translation of the pattern, if that's your actual stack:

  • One BaseCrudController with index/store/show/edit/update/destroy, pagination, and a protected function query(): Builder hook.
  • An artisan command (make:crud) that reads a stub, substitutes model/namespace/route names, and writes controller + resource routes + Blade views.
  • Customization points defined up front (form request class, query hook, view path) rather than "edit the generated file however you like."
  • Policy/authorization wired into the base controller so every generated CRUD inherits it.

Gotchas and Tips

Abandonment is the headline. Twenty stars, zero dependents, last release in April 2019. That means no Symfony 5/6/7 support, no PHP 8.x compatibility work, and no fixes for the ecosystem changes below. Budget for a fork-and-pin ("mwsimple/admin-crud": "dev-master" with your own patches, or a replaced local copy) or plan a migration from day one.

Known breakage vectors to check before committing:

  • getDoctrine() and Controller base class removals in newer Symfony — the base controller likely calls these.
  • Annotation routing vs. PHP 8 attributes; SensioFrameworkExtraBundle is deprecated in modern Symfony.
  • Twig API changes (renderView, app.request vs app.request in older Twig), and template path resolution differences between Symfony 3 and 4 directory layouts.
  • Doctrine ORM API drift (getEntityManager() vs getManager(), EntityManagerInterface typing).

Config quirks. The bundle alias rarely matches the Composer name. Check DependencyInjection/Configuration.php for the actual root key before writing YAML, and check whether the config has a default template/layout setting — forgetting to point it at your admin layout produces pages with no CSS that look "broken" but aren't.

Debugging order when a generated page 500s:

  1. tail var/logs/dev.log (or var/log/dev.log) — usually a missing template override or a Doctrine mapping error.
  2. bin/console debug:router — confirm the action is actually routed.
  3. bin/console debug:container | grep mwsimple — confirm the bundle registered and its services exist.
  4. bin/console cache:clear — mandatory after any template override; stale Twig cache is the single most common false alarm.

Extension points worth knowing: the base controller's protected methods (query building, form creation, post-save redirect), the form type injected per entity, and Doctrine event subscribers if you need list-level filtering that must survive pagination. Prefer these over editing generated files — they survive regeneration.

Comparative tip: if the choice is still open, EasyAdmin or SonataAdmin give you maintained, Symfony-current admin CRUD with configuration instead of code generation. The 2019 bundle's advantage is that the output is plain, readable controllers you own — which is also achievable by writing them yourself in about the time you'll spend debugging version incompatibilities. Its opportunity score being higher than its overall score reflects exactly that: the idea is worth more than the code.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums