File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ $file = TameFile();
112112| class | Assoc ` array ` | Create error and success class |
113113
114114``` config
115- FileConfig (
115+ config_file (
116116 message: [
117117 '401' => 'Select file to upload',
118118 '402' => 'File upload is greater than allowed size of:',
@@ -147,6 +147,15 @@ FileConfig(
147147);
148148```
149149
150+ - or -- using file class method ` Global Config `
151+ ```
152+ (new File)->globalConfig(
153+ message: [],
154+ config: [],
155+ class: []
156+ );
157+ ```
158+
150159## Response Data
151160- How to retrieve data
152161
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function TameFile($name = null)
1818}
1919
2020
21- if (! function_exists ('FileConfig ' )) {
21+ if (! function_exists ('config_file ' )) {
2222 /**
2323 * Global Configuration
2424 *
@@ -28,7 +28,7 @@ function TameFile($name = null)
2828 *
2929 * @return void
3030 */
31- function FileConfig ($ message = [], $ config = [], $ class = [])
31+ function config_file ($ message = [], $ config = [], $ class = [])
3232 {
3333 (new File )->globalConfig ($ message , $ config , $ class );
3434 }
Original file line number Diff line number Diff line change 44
55
66// Configure the file uploader using global function helper
7- FileConfig (
7+ config_file (
88 message: [
99 '401 ' => 'Select file to upload ' ,
1010 '402 ' => 'File upload is greater than allowed size of: ' ,
Original file line number Diff line number Diff line change 1111Env::loadOrFail ();
1212
1313
14- FileConfig (
14+ config_file (
1515 config: [
1616 'size ' => '3mb '
1717 ],
You can’t perform that action at this time.
0 commit comments