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

Symfony Traits Laravel Package

cisse/symfony-traits

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

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

4.0.4

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel