Weave Code
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

Doctrine Extensions Laravel Package

byteincoffee/doctrine-extensions

Laravel package integrating Doctrine Extensions with Eloquent models, adding behaviors like timestampable, sluggable, soft delete, and more. Provides easy configuration, listeners/subscribers, and seamless use of Doctrine-style extensions in Laravel apps.

View on GitHub
Deep Wiki
Context7

Uploadable - Uploadable behavioral extension for Doctrine 2

Keymaker

Uploadable comes with default keymaker.

<?php

use FSi\DoctrineExtensions\Uploadable\Keymaker\Entity;

$keymaker = new Entity();

You can use it as default keymaker (as described in uploadable documentation), or explicitely per field. Either way you can always set pattern for keymaker:

<?php

use Doctrine\ORM\Mapping as ORM;
use FSi\DoctrineExtensions\Uploadable\Mapping\Annotation\Uploadable;
use FSi\DoctrineExtensions\Uploadable\Keymaker\Entity;

class User
{
    // (...)

    /**
     * [@ORM](https://github.com/ORM)\Column()
     * [@Uploadable](https://github.com/Uploadable)(targetField="someField", keymaker=[@Entity](https://github.com/Entity), keyPattern="/{fqcn}/{property}/{original_name}")
     */
    protected $field;

    /**
     * [@ORM](https://github.com/ORM)\Column()
     * [@Uploadable](https://github.com/Uploadable)(targetField="someField2", keyPattern="/some/directory/{fqcn}/{id}/{original_name}")
     */
    protected $field2;

    // (...)
}

Specified keyPattern will be passed to keymaker during key generation, so you can control that process.

Some variables will be replaced:

  • {fqcn} - Fully qualified class name without slashes, so Acme\DemoBundle\Bundle\Entity\User will become AcmeDemoBundleBundleEntityUser.
  • {property} - Property name, in example above it would be field and field2.
  • {id} - Identity of entity.
  • {original_name} - Name of file.

Others variables as well as consts (numbers, slashes etc) will be ignored.

Default keyPattern for FSi\DoctrineExtensions\Uploadable\Keymaker\Entity is /{fqcn}/{property}/{id}/{original_name}.

Heads up! With keyPattern it's easy to make situation when uploadable extension can't generate unique key, so please be carefull with this option.

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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor