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

Symfony Traits Bundle Laravel Package

cisse/symfony-traits-bundle

View on GitHub
Deep Wiki
Context7

SYMFONY TRAITS

Symfony Traits is useful trait that will help you easily create your Symfony entities

Installation

Symfony traits uses Composer.

composer require cisse/symfony-traits-bundle

Usage

<?php

require __DIR__.'/vendor/autoload.php';

use Cisse\Bundle\TraitsBundle\Entity\Annotation\NoUnique\Nullable\Text\AddressTrait;
use Cisse\Bundle\TraitsBundle\Entity\Annotation\NoUnique\Nullable\Json\RolesTrait;

class Foo{
    use AddressTrait;
    // Declaration
    
    use RolesTrait {
        RolesTrait::__construct as private __constructRoles;
    }
    // Declaration with constructor alias

    public function __construct()
    {
        $this->__constructRoles();
        // Calling constructor from withing trait
    }
}

$foo = new Foo();

$foo->setAddress('your address'); // Return $foo.
$foo->getAddress(); // Return address

Notes

This component is a work in progress, and it is target for my own usages. But if you like it feel free to use it ;)

Versions

1.0.10

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.
codraw/entity-migrator
codraw/doctrine-extra
codraw/aws-tool-kit
codraw/validator
codraw/workflow
codraw/open-api
codraw/cron-job
codraw/process
codraw/log
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony