DEV Community

Mahmoud Ramadan
Mahmoud Ramadan

Posted on

Easy Model v1.1.3: A Hard-Earned Update with Many New Features and Improvements πŸ’ͺ

Easy Model v1.1.3 has just been released, packed with a bunch of new features and improvements

  • Adds the setUpdatableQuery method.

adds-setUpdatableQuery-method

  • Adds the fetchBuilder method.

adds-fetchBuilder-method

  • Adds the setSearchableQuery method.

adds-setSearchableQuery-method

  • Adds the ability to specify the builder type that is getting back.
  • Updates the return type of the setUpdatableModel method.
  • Removes the setChainableModel method.
  • Removes the updateOrCreateModel and updateOrCreateRelationship methods.
  • Fixes the issue of updating single model instances.
  • Fixes the issue of populating the updated_at column when incrementing and decrementing values.
  • Fixes the issue of toggling many columns at a bunch of records.
  • Fixes the model serialization issue encountered in the toggleColumns method.
  • Fixes the issue of updating an empty array of togglable columns.

Full Changelog:Β v1.1.2...v1.1.3


Throughout this long and challenging release journey, I discovered an awesome PHP feature called Closure Binding. This feature enables you to expose private and protected methods concisely, eliminating the need for PHP Reflection. I leveraged this feature to utilize Laravel's addUpdatedAtColumn method rather than building the same functionality within the package. πŸš€

php-closure-binding

Top comments (0)