File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ protected function getCasters()
118118 $ casters = [
119119 'Illuminate\Support\Collection ' => 'Laravel\Tinker\TinkerCaster::castCollection ' ,
120120 'Illuminate\Support\HtmlString ' => 'Laravel\Tinker\TinkerCaster::castHtmlString ' ,
121+ 'Illuminate\Support\Stringable ' => 'Laravel\Tinker\TinkerCaster::castStringable ' ,
121122 ];
122123
123124 if (class_exists ('Illuminate\Database\Eloquent\Model ' )) {
Original file line number Diff line number Diff line change @@ -81,6 +81,19 @@ public static function castHtmlString($htmlString)
8181 ];
8282 }
8383
84+ /**
85+ * Get an array representing the properties of a fluent string.
86+ *
87+ * @param \Illuminate\Support\Stringable $stringable
88+ * @return array
89+ */
90+ public static function castStringable ($ stringable )
91+ {
92+ return [
93+ Caster::PREFIX_VIRTUAL .'value ' => (string ) $ stringable ,
94+ ];
95+ }
96+
8497 /**
8598 * Get an array representing the properties of a model.
8699 *
You can’t perform that action at this time.
0 commit comments