1 | <?php |
||
20 | class TinkerCaster |
||
21 | { |
||
22 | /** |
||
23 | * Illuminate application methods to include in the presenter. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | private static $appProperties = [ |
||
28 | 'environment', |
||
29 | 'basePath', |
||
30 | 'databasePath', |
||
31 | 'resourcePath', |
||
32 | 'storagePath', |
||
33 | 'version', |
||
34 | 'getRoutes', |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * Get an array representing the properties of an application. |
||
39 | * |
||
40 | * @param \Laravel\Lumen\Application $app |
||
41 | * @return array |
||
42 | */ |
||
43 | public static function castApplication(Application $app) |
||
62 | |||
63 | /** |
||
64 | * Get an array representing the properties of a collection. |
||
65 | * |
||
66 | * @param \Illuminate\Support\Collection $collection |
||
67 | * @return array |
||
68 | */ |
||
69 | public static function castCollection(Collection $collection) |
||
75 | |||
76 | /** |
||
77 | * Get an array representing the properties of a model. |
||
78 | * |
||
79 | * @param \Illuminate\Database\Eloquent\Model $model |
||
80 | * @return array |
||
81 | */ |
||
82 | public static function castModel(Model $model) |
||
101 | } |
||
102 |