File tree Expand file tree Collapse file tree 2 files changed +29
-15
lines changed Expand file tree Collapse file tree 2 files changed +29
-15
lines changed Original file line number Diff line number Diff line change 1717 "require" : {
1818 "php" : " >=8.0" ,
1919 "tamedevelopers/support" : " ^1.0.2" ,
20- "aws/aws-sdk-php" : " ^3.282.1 "
20+ "aws/aws-sdk-php" : " ^3.282.0 "
2121 },
2222 "suggest" : {
23- "aws/aws-sdk-php" : " Required to use Amazon `s3` composer require aws/aws-sdk-php (^3.281.13 )."
23+ "aws/aws-sdk-php" : " Required to use Amazon `s3` composer require aws/aws-sdk-php (^3.282.0 )."
2424 },
2525 "autoload" : {
2626 "psr-4" : {
Original file line number Diff line number Diff line change 1717 ],
1818);
1919
20+ // easy as this
21+ File::name ('avatar ' )
22+ ->validate ()
23+ ->save ();
2024
25+
26+ // or more methods chaining
27+ File::name ('avatar ' )
28+ ->limit (3 )
29+ ->mime ('files ' )
30+ ->driver ('s3 ' )
31+ ->folder ('public/images ' )
32+ ->validate ()
33+ ->save ();
34+
35+
36+ // closure/callable on save() and validate()
2137$ upload = File::name ('banners ' )
22- ->limit (2 )
23- // ->folder('upload')
24- // ->driver('s3')
25- ->validate ()
26- ->save (function ($ response ){
38+ ->validate ()
39+ ->save (function ($ response ){
2740
28- $ response
29- ->watermark ('test/watermark.png ' , 'bottom-left ' , 50 )
30- // ->resize(690, 540)
31- ->compress ();
41+ $ response
42+ ->watermark ('test/watermark.png ' , 'bottom-left ' , 50 )
43+ ->resize (690 , 540 )
44+ ->compress ();
45+ });
3246
3347
34- dump (
35- $ response
36- );
48+ // has method
49+ if (File::has ('avatar ' )){
50+ // perform query
51+ }
3752
38- });
3953
4054//
4155if (File::has ('avatar ' )){
You can’t perform that action at this time.
0 commit comments