Download the PHP package banulakwin/laravel-eloquent-columns without Composer

On this page you can find all versions of the php package banulakwin/laravel-eloquent-columns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-eloquent-columns

Laravel Eloquent Columns (banulakwin/laravel-eloquent-columns)

Latest Version on Packagist Tests Total Downloads

Portable Eloquent traits and Blueprint macros for common column patterns: active, featured, sort order, timestamps + soft deletes, slug pair (via Spatie Sluggable), audit user columns (created_by, updated_by, deleted_by), and SEO meta columns.

Activity/event logging is not included (intended as a separate package later).


Requirements


Installation

Auto-discovery registers Banulakwin\EloquentColumns\EloquentColumnsServiceProvider.

Optional publish:

Config key Purpose
register_macros Register Blueprint macros on boot (default true). Env: ELOQUENT_COLUMNS_REGISTER_MACROS.
user_model Class for HasAuditColumns creator() / updater() / deleter(). Falls back to auth.providers.users.model if empty. Env: ELOQUENT_COLUMNS_USER_MODEL.

Traits (Banulakwin\EloquentColumns\Concerns)

Trait Notes
HasActiveColumn is_active scope active(), helpers markActive / markInactive. Override getActiveColumn().
HasFeaturedColumn Same pattern for is_featured / featured scope.
HasSortOrderColumn Scopes orderBySortOrder, orderBySortOrderDesc, moveBefore / moveAfter.
HasTimestampColumns Datetime casts + optional soft deletes; override shouldUseSoftDeletes() to disable.
HasSlugColumns Spatie HasSlug + slugColumns fillable; route key = slug. Override source/slug column methods.
HasAuditColumns Fills audit IDs on create/update/delete when Auth::check(). Relationships need a resolvable user model (see config).
HasMetaColumns Fillable + casts for meta_title, meta_description, meta_keywords (array), meta_image. Override column name methods if needed.

Blueprint macros

Registered when eloquent-columns.register_macros is true:

Macro Signature
activeColumn ($name = 'is_active', $default = true)
featuredColumn ($name = 'is_featured', $default = false)
sortOrderColumn ($name = 'sort_order', $default = 0)
slugColumns ($main = 'name', $slug = 'slug')
timestampColumns ($withSoftDeletes = true)
auditColumns ($created = 'created_by', $updated = 'updated_by', $deleted = 'deleted_by', $useUlid = true) — set $useUlid to false for foreignId (bigint) columns.
metaColumns ($title = 'meta_title', $description = 'meta_description', $keywords = 'meta_keywords', $image = 'meta_image')

Example migration


Example model


Testing


Changelog

See CHANGELOG.md for details.


Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Run composer quality to ensure tests and style pass
  4. Commit and push
  5. Open a pull request

Package layout


License

MIT — see LICENSE for details.


All versions of laravel-eloquent-columns with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/auth Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
spatie/laravel-sluggable Version ^3.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package banulakwin/laravel-eloquent-columns contains the following files

Loading the files please wait ...