websk / php-crud
CRUD
Requires
- php: ^8.3
- ext-fileinfo: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- juliangut/slim-php-di: ^4.2
- slim/slim: ^4.15
- websk/php-cache: 3.0.*
- websk/php-config: 2.2.*
- websk/php-db: 3.0.*
- websk/php-entity: 3.0.*
- websk/php-filemanager: 3.0.*
- websk/php-slim: 2.4.*
- websk/php-utils: 3.0.*
- websk/php-view: 3.1.*
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-12 08:48:31 UTC
README
CRUD forms, tables, filters and widgets for WebSK applications based on Slim 4 and PHP-DI.
Requirements
- PHP 8.3 or newer, including PHP 8.5
- Composer 2
- PHP extensions:
fileinfo,json,mbstring,pdo
Install
https://packagist.org/packages/websk/php-crud
Install the package with Composer:
composer require websk/php-crud
Config
CRUD requires no package-specific configuration. Register CRUDServiceProvider in a mutable PSR-11 container. PHP-DI 7 applications can use MutableContainerAdapter while registering legacy WebSK service providers.
Development
Run all PHP checks with:
composer check
This command runs syntax checks, PHPUnit and PHPStan at level max.
Build static demo assets with:
npm ci npm run build
Demo
-
Install mkcert.
-
Initialize its local CA:
mkcert --install
-
Create a local certificate for
php-crud.devbox:mkcert php-crud.devbox
-
Copy the generated certificate and key to
var/docker/nginx/sitesusing the names referenced by the nginx configuration. -
Add the host to
/etc/hosts, or%WINDIR%\System32\drivers\etc\hostson Windows:127.0.0.1 php-crud.devbox -
Create the local application configuration and adjust it if needed:
cp config/config.example.php config/config.php
-
Enter the Docker directory:
cd var/docker -
Create the local environment file and adjust it if needed:
cp .example.env .env
-
Build and start the containers. The PHP-FPM image uses PHP 8.5:
docker compose up -d --build
-
Install project dependencies:
docker compose exec php-fpm composer install -
Run database migrations:
docker compose exec php-fpm php vendor/bin/websk_db_migration.php migrations:migration_autoOr run migrations interactively:
docker compose exec php-fpm php vendor/bin/websk_db_migration.php migrations:migration_handle -
Build static assets:
npm ci npm run build
-
Open
https://php-crud.devbox.
License
This project is licensed under the MIT License.