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

Pre-release
Pre-release
Compare
Choose a tag to compare
@igorsantos07 igorsantos07 released this 24 Jul 01:42
  • addition of before/afterSave, Update, Delete, Validate hooks, that are called statically with the model being received as only argument
  • 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)