badaso/content-module
Badaso content module adds structured content management to the Badaso Laravel headless CMS. Create content types and entries, manage them from the admin dashboard, and serve them through APIs to any frontend or mobile app. Includes CRUD operations and API endpoints.
badaso/content-module is an add-on, not a standalone package. You need a working Badaso admin (badaso/core) on a Laravel 8/9/10 app — and now Laravel 11 as of 2.2.0 — with the admin panel reachable at /badaso-dashboard before this module does anything useful. If you're on Laravel 11, pin badaso/content-module to ^2.2 and check that your badaso/core version also supports Laravel 11, since the two must move together.composer require badaso/content-module
Then run the module installer so its migrations, seeders, and menu entries register:
php artisan badaso:setup content-module
php artisan migrate
php artisan db:seed --class=BadasoContentModuleSeeder
(Command names have shifted between Badaso versions — check php artisan list | grep badaso and the module's README if badaso:setup doesn't accept the module slug in your version.)src/ and database/migrations/ in vendor/badaso/content-module — the migration files are the fastest way to learn the data model (content types, content entries, and their relationships), and src/Routes/ shows the API surface you can call from a frontend.blog_post with fields title, slug, body, image), then add a Content entry against it. That two-step flow — define schema, then author entries — is the whole point of the module.$posts = \Badaso\Module\Content\Models\Content::query()
->whereRelation('contentType', 'slug', 'blog_post')
->where('status', 'published')
->latest()
->paginate(12);
Verify exact class namespaces against src/Models/ — the module has been renamed across versions./api/v1/content/...). Use those endpoints when a separate SPA/mobile app consumes the CMS, and skip writing your own controllers. Inspect src/Routes/api.php for the actual URIs.Cache::remember) since the module does not ship aggressive caching and content reads happen on most pages.composer.json ("badaso/content-module": "x.y.z") and vendor-lock it.badaso/core. Version mismatches between core and this module are the most common failure mode. If the dashboard menu item or migration throws after install, check the badaso/core version constraint in the module's composer.json first. The 2.2.0 Laravel 11 bump makes this sharper than ever: the module now supports Laravel 11, but you need a Laravel-11-compatible badaso/core too, or you'll get a half-working install.php artisan migrate after a composer update may pull new schema changes with no upgrade path documented. Take a DB dump before every module update. 2.2.0 touched the badaso_content_setups table (marking it hidden) — cosmetic, but confirm your setup records survived the upgrade if you're coming from 2.1.x.composer.json but not in the sidebar, the seeder didn't run or the permissions didn't attach to your admin role. Re-run the module seeder and check badaso_menus / badaso_permissions tables. Note that the setup table is now hidden from the admin UI in 2.2.0 — if you relied on seeing it in the dashboard for troubleshooting, query it directly.badaso/core's built-in CRUD generator covers your need before pulling in this extra package.How can I help you explore Laravel packages today?