for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelDoctrine\Fluent\Extensions\Gedmo;
use Gedmo\Blameable\Mapping\Driver\Fluent;
use LaravelDoctrine\Fluent\Buildable;
use LaravelDoctrine\Fluent\Builders\Field;
use LaravelDoctrine\Fluent\Extensions\Extension;
use LaravelDoctrine\Fluent\Relations\ManyToOne;
class Blameable extends AbstractTrackingExtension implements Buildable, Extension
{
const MACRO_METHOD = 'blameable';
/**
* Enable the extension.
*
* @return void
*/
public static function enable()
Field::macro(self::MACRO_METHOD, function (Field $builder) {
return new static($builder->getClassMetadata(), $builder->getName());
});
ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) {
return new static($builder->getClassMetadata(), $builder->getRelation());
}
* Return the name of the actual extension.
* @return string
protected function getExtensionName()
return Fluent::EXTENSION_NAME;