PHPackages                             eidng8/laravel-schema-ext - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. eidng8/laravel-schema-ext

ActiveLibrary

eidng8/laravel-schema-ext
=========================

Adds various types to laravel schema definition.

03[2 PRs](https://github.com/eidng8/laravel-schema-ext/pulls)PHP

Since Mar 9Pushed 3y agoCompare

[ Source](https://github.com/eidng8/laravel-schema-ext)[ Packagist](https://packagist.org/packages/eidng8/laravel-schema-ext)[ RSS](/packages/eidng8-laravel-schema-ext/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (0)

laravel-schema-ext
==================

[](#laravel-schema-ext)

There package is intend to supplement specific aspects of Laravel's migration (schema). All methods added by this package have underscore suffix, or a few characters following the underscore.

Methods
-------

[](#methods)

Currently there are only 3 methods in this package.

### `binary_($column, $length = null)`

[](#binary_column-length--null)

This method adds a `binary` column to the table. Besides the capability of setting the column length, other differences with Laravel's `binary` method are:

DatabaseextLaravelMySQLbinary($length)blobPostgreSQLbytea($length)byteaSQLiteblob($length)blobSQL Serverbinary($length)varbinary### `binary_v($column, $length = null)`

[](#binary_vcolumn-length--null)

This method adds a `varbinary` column to the table. Besides the capability of setting the column length, other differences with Laravel's `binary` method are:

DatabaseextLaravelMySQLvarbinary($length)blobPostgreSQLbytea($length)byteaSQLiteblob($length)blobSQL Servervarbinary($length)varbinary### `uuid_($column)`

[](#uuid_column)

This is a shorthand of `binary_($column, 16)`.

### `foreignUuid_($column)`

[](#foreignuuid_column)

Creates a UUID column and its corresponding foreign key.

### `foreignIdFor_($model, $column = null)`

[](#foreignidfor_model-column--null)

Adds UUID support to eloquent's `foreignIdFor()` method.

`eidng8\Laravel\Schema\Eloquent\UuidModel`
------------------------------------------

[](#eidng8laravelschemaeloquentuuidmodel)

This model handles common processes of UUID, such as generating UUID automatically.

Models inheriting this should *not* use the primary key columns directly. Use `getKey()` and `setKey()` instead.

### `getKey(bool $autoGen = false): ?string`

[](#getkeybool-autogen--false-string)

Returns a human friendly string of the UUID. If `$autoGen` is `true`, automatically generation a UUID if the instance doesn't have one.

### `setKey($uuid = null): void`

[](#setkeyuuid--null-void)

Sets the primary key column's value to the given UUID. Makes sure the stored value is in binary form. The `$uuid` can be a UUID instance, human friendly representation of UUID, binary UUID string, or `null`. A version 1 UUID will be generated if `null`.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e325829d475b2e90d695eeca2d76e5c82d5fca32f42615578e43d244f56bb26?d=identicon)[eidng8](/maintainers/eidng8)

---

Top Contributors

[![eidng8](https://avatars.githubusercontent.com/u/787265?v=4)](https://github.com/eidng8 "eidng8 (9 commits)")

### Embed Badge

![Health badge](/badges/eidng8-laravel-schema-ext/health.svg)

```
[![Health](https://phpackages.com/badges/eidng8-laravel-schema-ext/health.svg)](https://phpackages.com/packages/eidng8-laravel-schema-ext)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
