Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

New hooks, exceptions and relationsData array

Compare
Choose a tag to compare
@igorsantos07 igorsantos07 released this 24 Jul 01:44
· 124 commits to master since this release
  • addition of before/afterSave, Update, Delete and Validate hooks, that are called by the model when the given events happen, with no arguments (changed from the RC)
  • addition of Ardent::throwOnFind boolean property to forcefully throw exceptions when models are not found (forcing usage of findOrFail)
  • addition of InvalidModelException, enabled by Ardent::throwOnValidate
  • addition of Ardent::relationsData static attribute that makes it much easier to define relations, cleaning the clutter in models with many relationships
  • cleaner code, following code style rules (almost PSR-2, except for braces)