Download the PHP package zofe/demo-module without Composer
On this page you can find all versions of the php package zofe/demo-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zofe/demo-module
More information about zofe/demo-module
Files in zofe/demo-module
Package demo-module
Short Description The self-documenting CRUD demo of rapyd-admin: a table, a detail page and a form for Articles, each page showing its own route, component and view.
License MIT
Informations about the package demo-module
Rapyd Admin — Demo module
The self-documenting CRUD demo of Rapyd Admin: a table, a detail page and a
form for Articles by Authors. Every page shows, right under it, the route, the Livewire component and the Blade
view that produce it, so you see how little a CRUD takes. It is also the reference for a module packaged on its
own: same folder layout as a module generated in app/Modules, plus composer.json, a provider and tests.
Live: rapyd.dev/demo
Install
Open /demo and click Populate the database (or php artisan db:seed --class="App\\Modules\\Demo\\Database\\Seeders\\DemoSeeder").
A "Crud Demo" entry appears in the admin sidebar and in the public navbar. The pages are public on purpose: it is a showcase.
Demo data and the "re-populate" link
The seeder creates 10 authors with 2 articles each and replaces whatever is there. The demo home offers a "Re-populate the demo data" link, enabled by default: on your machine you are the only user, and after creating, editing and deleting records you want a clean dataset back with one click.
On a shared, public demo turn it off, otherwise one visitor wipes what another is trying:
or 'repopulate' => false in a config/demo.php of the application. The link disappears and the action answers 403;
filling an empty database stays possible. Reset the data on a schedule instead, e.g. in routes/console.php:
This is what rapyd.dev does.
What to look at
ArticlesTable:WithDataTable, search through theSSearchtrait, an author filter, sorting and pagination in ax-rpd::table.ArticlesEdit: ax-rpd::editform bound to the model,$rulesas the single source of validation and of the fields kept between requests,x-rpd::rich-textfor the body.Documenter: prints the source of a file (or a route matched by a regex) with the documentation block stripped.- Copy the folder to
app/Modules/Demoand it keeps working as an app module: the provider steps aside.
Tests
All versions of demo-module with dependencies
illuminate/config Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
livewire/livewire Version ^4.0
zofe/rapyd-admin Version ^9.17
fakerphp/faker Version ^1.23