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

Crud Bundle Laravel Package

ewll/crud-bundle

View on GitHub
Deep Wiki
Context7

Ewll/CrudBundle

Installation

composer require ewll/crud-bundle

Add to packages configuration:
config/bundles.php

...
Ewll\CrudBundle\EwllCrudBundle::class => ['all' => true]`
...

config/routes.yaml

ewll_crud:
  resource: '@EwllCrudBundle/Resources/config/routing.yaml'
  prefix: '/crud'

Units

Ewll\CrudBundle\Unit\UnitInterface

public function setUserProvider(UserProviderInterface $userProvider): void

This function allows to inject mechanism of getting user inside unit.

public function getUnitName(): string

The main name for URL. Must be unique of all other utits.

public function getEntityClass(): string

The main entity class.

public function getSourceClassName(): string

Class name of class implemented Ewll\CrudBundle\Source\SourceInterface allows access to entity storage.

public function getAccessRuleClassName(): ?string

Class name of ewll/user-bundle AccessRule class implemented Ewll\UserBundle\AccessRule\AccessRuleInterface.

public function getAccessConditions(string $action): array

Must returns array of Access Conditions.

public function getCustomActions(): array

Must returns array of Custom Actions class names.

Ewll\CrudBundle\Unit\CreateMethodInterface

Allows to create entities by request: POST /crud/{unitName}

public function getCreateFormConfig(): FormConfig

Set Form Config for entity creation.

public function getMutationsOnCreate(object $entity): array

Returns array of fields with new values. This method calls before storing.

public function onCreate(object $entity, array $formData): void

Some actions inside transaction within INSERT.

public function getCreateExtraData(object $entity): array

Some data you need to see in Response after success creation.

Ewll\CrudBundle\Unit\UpdateeMethodInterface

Ewll\CrudBundle\Unit\ReadMethodInterface

Ewll\CrudBundle\Unit\DeleteMethodInterface

Access Conditions

@TODO

Custom Actions

@TODO

Form Config

Ewll\CrudBundle\Form\FormConfig
This is some wrapper for Symfony Form Building

Read Transformers

Use read transformers to transform data into views.

  • You can use our common read transformers from Ewll\CrudBundle\ReadViewCompiler\Transformer.
  • Or create your:
    In order to create transformer you need to create two classes in App\Crud\Transformer.
  1. Implement Ewll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInitializerInterface. Use abstract class Ewll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInitializerInterface. This class is needed to define transformer parameters. You will put it into Unit methods getReadListFields() and getReadOneFields().
  2. Implement Ewll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInterface. Make it as service with tag crud_view_transformer.
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.
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
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names