towersystems/resource-bundle

There is no license information available for the latest version (1.1.4) of this package.

Zend Expressive ; Resources in an Application

1.1.4 2019-12-10 22:32 UTC

This package is auto-updated.

Last update: 2024-04-23 09:58:19 UTC


README

Register a resource that can be used in your application.

Resource Controller, Factory, Repository, and CRUD api will be generated for your resource.

e.g

Register a new resource

[
    'towersystems_resource' => [
        "resources" => [
            'tower.category' => [
                'classes' => [
                    'model' => Category::class,
                    'interface' => CategoryInterface::class,
                ],
            ],
        ],
    ],
];

Create API Routes

[
    'towersystems_resource' => [
        'routes' => [
            'category' => [
                'alias' => 'tower.category',
                'only' => ['show', 'index', 'create', 'update', 'delete'],
            ],
        ],
    ],
];

Service Manager

    $container->get("tower.repository.category");
    $container->get("tower.factory.category");
    $container->get("tower.handler.category");