Relationships
BelongsTo
use WendellAdriel\Lift\Attributes\Relations\BelongsTo;
#[BelongsTo(User::class)]
final class Post extends Model
{
use Lift;
// ...
}BelongsToMany
use WendellAdriel\Lift\Attributes\Relations\BelongsToMany;
#[BelongsToMany(Role::class)]
final class User extends Model
{
use Lift;
// ...
}HasMany
HasManyThrough
HasOne
HasOneThrough
MorphMany/MorphTo
MorphOne/MorphTo
MorphToMany/MorphedByMany
Customizing the Relationship
Last updated