File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
src/Kodeine/Acl/Models/Eloquent Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2020 ],
2121 "require" : {
2222 "php" : " >=7.2" ,
23- "illuminate/support" : " ^6.0"
23+ "illuminate/support" : " ^6.0|^7.0 "
2424 },
2525 "require-dev" : {
2626 "phpunit/phpunit" : " ^8.0" ,
27- "orchestra/testbench" : " ^4.0" ,
27+ "orchestra/testbench" : " ^4.0|^5.0 " ,
2828 "doctrine/dbal" : " ^2.9"
2929 },
3030 "autoload" : {
Original file line number Diff line number Diff line change 22
33namespace Kodeine \Acl \Models \Eloquent ;
44
5+ use DateTimeInterface ;
56use Illuminate \Database \Eloquent \Model ;
67use Kodeine \Acl \Traits \HasPermission ;
78
@@ -30,6 +31,17 @@ public function __construct(array $attributes = [])
3031 parent ::__construct ($ attributes );
3132 }
3233
34+ /**
35+ * Prepare a date for array / JSON serialization.
36+ *
37+ * @param DateTimeInterface $date
38+ * @return string
39+ */
40+ protected function serializeDate (DateTimeInterface $ date )
41+ {
42+ return $ date ->format ('Y-m-d H:i:s ' );
43+ }
44+
3345 /**
3446 * Use the slug of the Role
3547 * instead of the ID.
You can’t perform that action at this time.
0 commit comments