@@ -356,7 +356,7 @@ <h6>Inserts, Updates, Deletes</h6>
356
356
DB::table('name')-
> insertGetId(array('name' =
> 'John', 'email' =
> '
[email protected] '));
357
357
// Batch insert
358
358
DB::table('name')-> insert(array(
359
- array('name' =
> 'John', 'email' =
> '
[email protected] ')
359
+ array('name' =
> 'John', 'email' =
> '
[email protected] ')
,
360
360
array('name' =
> 'James', 'email' =
> '
[email protected] ')
361
361
));
362
362
// Update an entry
@@ -1270,6 +1270,7 @@ <h6>Strings</h6>
1270
1270
str_is('foo*', 'foobar');
1271
1271
str_plural('car');
1272
1272
str_random(25);
1273
+ str_limit($value, $limit = 100, $end = '...')
1273
1274
str_singular('cars');
1274
1275
// Result: FooBar
1275
1276
studly_case('foo_bar');
@@ -1357,6 +1358,29 @@ <h6>SFTP Uploads</h6>
1357
1358
< pre class ="prettyprint lang-php "> SSH::put($localFile, $remotePath);
1358
1359
SSH::putString($string, $remotePath);
1359
1360
</ pre >
1361
+
1362
+ < h6 > Filesystem/Cloud Storage</ h6 >
1363
+ < pre class ="prettyprint lang-php ">
1364
+ Storage::disk('s3');
1365
+ Storage::disk('local')-> put('file.txt', 'Contents');
1366
+ Storage::disk('local')-> get('file.jpg');
1367
+ Storage::disk('s3')-> exists('file.jpg');
1368
+ Storage::get('file.jpg');
1369
+ Storage::put('file.jpg', $contents);
1370
+ Storage::size('file1.jpg');
1371
+ Storage::lastModified('file1.jpg');
1372
+ Storage::copy('old/file1.jpg', 'new/file1.jpg');
1373
+ Storage::move('old/file1.jpg', 'new/file1.jpg');
1374
+ Storage::prepend('file.log', 'Prepended Text');
1375
+ Storage::append('file.log', 'Appended Text');
1376
+ Storage::delete(['file1.jpg', 'file2.jpg']);
1377
+ Storage::files($directory);
1378
+ Storage::allFiles($directory);
1379
+ Storage::directories($directory);
1380
+ Storage::allDirectories($directory);
1381
+ Storage::makeDirectory($directory);
1382
+ Storage::deleteDirectory($directory);
1383
+ </ pre >
1360
1384
</ div >
1361
1385
1362
1386
</ div >
0 commit comments