gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
54 stars 16 forks source link

Mutators & Casting does not work properly #72

Closed seagullmark closed 2 months ago

seagullmark commented 2 months ago

Dependencies

Dependencies

Description of the issue:

Mutators & Casting

Expected Behavior:

Set is executed when it should be get.

Steps to reproduce:

Define the following in Model user.php protected function password(): Attribute { return Attribute::make( get: fn ($value) => $value, set: fn ($value) => Hash::make($value), ); }

DB is value ↓ $2y$12$B8fH8uWd2bKE4plEi.NzDOPFgiIVnA4YT0IsaWfInRu1CfMdE7mXy

EloquentUserProvider.php $user->getAuthPassword() is value ↓ $2y$12$vW6JV6Q8C6ibixVZkMVvVOIztgnt82SFK/MjrSW6c5hn0Vw9vQ35q

alexandrosraikos commented 2 months ago

+1

Smef commented 2 months ago

Fixed in version 2.4.2.