Skip to content

Commit e0787e8

Browse files
Added custom caster support (#133)
* Added custom caster support * Optimized config * Update tinker.php * Update tinker.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 5711c72 commit e0787e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Console/TinkerCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ protected function getCasters()
129129
$casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication';
130130
}
131131

132-
return $casters;
132+
$config = $this->getLaravel()->make('config');
133+
134+
return array_merge($casters, (array) $config->get('tinker.casters', []));
133135
}
134136

135137
/**

0 commit comments

Comments
 (0)