File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use DragonCode \LaravelActions \Helpers \Config ;
8
8
use DragonCode \SimpleDataTransferObject \DataTransferObject ;
9
+ use DragonCode \Support \Facades \Helpers \Boolean ;
9
10
use DragonCode \Support \Facades \Helpers \Str ;
10
11
use Illuminate \Container \Container ;
11
12
@@ -49,6 +50,26 @@ protected function castName(?string $value): ?string
49
50
->toString ();
50
51
}
51
52
53
+ protected function castBefore (mixed $ value ): bool
54
+ {
55
+ return Boolean::parse ($ value );
56
+ }
57
+
58
+ protected function castForce (mixed $ value ): bool
59
+ {
60
+ return Boolean::parse ($ value );
61
+ }
62
+
63
+ protected function castRealpath (mixed $ value ): bool
64
+ {
65
+ return Boolean::parse ($ value );
66
+ }
67
+
68
+ protected function castStep (string |int |null $ value ): ?int
69
+ {
70
+ return is_numeric ($ value ) ? (int ) $ value : null ;
71
+ }
72
+
52
73
protected function config (): Config
53
74
{
54
75
return Container::getInstance ()->make (Config::class);
You can’t perform that action at this time.
0 commit comments