We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cc2c8e5 + 47598cf commit 3e3394eCopy full SHA for 3e3394e
src/Mutable.php
@@ -28,6 +28,14 @@ trait Mutable
28
*/
29
public static function bootMutable()
30
{
31
+ if (!isset(static::$attributeMutator)) {
32
+ if (function_exists('app') && app()->bound('eloquence.mutator')) {
33
+ static::setAttributeMutator(app('eloquence.mutator'));
34
+ } else {
35
+ static::setAttributeMutator(new Mutator);
36
+ }
37
38
+
39
$hooks = new Hooks;
40
41
foreach (['setAttribute', 'getAttribute', 'toArray'] as $method) {
0 commit comments