Releases: cleaniquecoders/traitify
v1.0.2
- Added #1
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Traitify v1.0.1 Release Notes
Release Date: 15th October 2024
This patch release focuses on improvements to the InteractsWithSqlViewMigration
trait, which simplifies SQL view management in Laravel migrations.
Key Updates in v1.0.1:
- InteractsWithSqlViewMigration Trait:
- Automates the process of managing SQL views during migrations.
- Supports the use of external SQL files to create and drop views.
- Ensures better error handling with exceptions when SQL files are missing.
- Customizable filenames for both creating and dropping views via
getUpFilename()
andgetDownFilename()
methods.
Installation:
To update to v1.0.1, run:
composer update cleaniquecoders/traitify
Documentation:
For more details on how to use the InteractsWithSqlViewMigration
trait, please refer to the GitHub repository.
This update enhances how SQL views are handled in migrations, making it easier to maintain and organize SQL scripts in your Laravel projects.
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Release Notes for Traitify v1.0.0
Release Date: 15th October 2024
We are excited to announce the first official release of Traitify (v1.0.0), a Laravel package that provides a set of reusable traits and contracts to streamline application development and enforce best practices.
New Features:
-
InteractsWithUuid Trait:
- Automatically generates UUIDs for models during creation.
- Supports custom UUID column names.
- Provides query scope for filtering models by UUID.
-
InteractsWithUser Trait:
- Automatically assigns the authenticated user ID to models during creation.
- Supports custom user ID column names.
- Works seamlessly with Laravel's
Auth
facade.
-
InteractsWithToken Trait:
- Automatically generates random 128-character tokens for models.
- Supports custom token column names.
- Provides query scope for filtering models by token.
-
InteractsWithSearchable Trait:
- Adds case-insensitive search functionality to models.
- Supports searching across single or multiple fields.
-
InteractsWithResourceRoute Trait:
- Helps in generating resource URLs (e.g.,
index
,show
) for models. - Automatically derives route base names from model names.
- Helps in generating resource URLs (e.g.,
-
InteractsWithMeta Trait:
- Manages meta fields dynamically in models.
- Automatically adds casts for the
meta
attribute as an array. - Supports default meta values.
-
InteractsWithEnum Trait:
- Provides methods to handle enum values, labels, and options with descriptions.
- Supports usage in select inputs for better UX.
-
InteractsWithDetails Trait:
- Allows models to define related details and apply eager loading.
- Provides a query scope to load related details efficiently.
-
InteractsWithApi Trait:
- Simplifies API response structure with methods for data, messages, and status codes.
- Supports customization of API responses.
Contracts:
-
Builder Contract:
- Defines a
build()
method that returns the instance of the class implementing it.
- Defines a
-
Execute Contract:
- Defines an
execute()
method that returns the instance of the class implementing it.
- Defines an
-
Menu Contract:
- Defines a
menus()
method that returns a collection of menu items.
- Defines a
-
Processor Contract:
- Defines a
process()
method that returns the instance of the class implementing it.
- Defines a
Improvements & Enhancements:
- Enhanced unit tests for each trait and contract, ensuring reliable functionality.
- Compatibility with Laravel's core features like UUIDs, meta fields, token management, and API responses.
- Designed to be modular, flexible, and easy to extend.
Installation:
You can install the package via Composer:
composer require cleaniquecoders/traitify
Documentation:
Full documentation and examples are available in the repository’s README.
Full Changelog: https://github.com/cleaniquecoders/traitify/commits/v1.0.0