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

Laravel Cycle Orm Adapter Laravel Package

wayofdev/laravel-cycle-orm-adapter

View on GitHub
Deep Wiki
Context7

import {Callout} from "nextra-theme-docs"; import ExternalLink from "../../components/external-link";

Many to Many

The ManyToMany relationship links multiple entities to multiple related entities. For example, if each post can have multiple tags and each tag can be associated with multiple posts, this relationship can be annotated in the Post and Tag entities.

<?php

declare(strict_types=1);

namespace App\Entities;

use Cycle\Annotated\Annotation\Column;
use Cycle\Annotated\Annotation\Entity;
use Cycle\Annotated\Annotation\Relation\ManyToMany;

#[Entity]
class Post
{
    #[Column(type: 'primary')]
    private $id;

    #[Column(type: 'string')]
    private $title;

    #[Column(type: 'text')]
    private $content;

    #[ManyToMany(target: 'App\Entities\Tag', though: 'App\Entities\PostTag')]
    private $tags;
}
<?php

declare(strict_types=1);

namespace App\Entities;

use Cycle\Annotated\Annotation\Column;
use Cycle\Annotated\Annotation\Entity;
use Cycle\Annotated\Annotation\Relation\ManyToMany;

#[Entity]
class Tag
{
    #[Column(type: 'primary')]
    private $id;

    #[Column(type: 'string')]
    private $name;

    #[ManyToMany(target: App\Entities\Post::class, though: 'App\Entities\PostTag')]
    private $posts;
}
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
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