PHP code example of superbalist / laravel4-storage
1. Go to this page and download the library: Download superbalist/laravel4-storage library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Storage;
// write to a file
Storage::write('path/to/file.txt', 'contents');
// update a file
Storage::update('path/to/file.txt', 'new contents');
// read a file
$contents = Storage::read('path/to/file.txt');
// check if a file exists
$exists = Storage::has('path/to/file.txt');
// delete a file
Storage::delete('path/to/file.txt');
// rename a file
Storage::rename('filename.txt', 'newname.txt');
// copy a file
Storage::copy('filename.txt', 'duplicate.txt');
// specify the storage connection to use
$contents = Storage::connection('rackspace')->listContents();
// get a public url to a file
// this is currently only supported by the local and google cloud adapters
$url = Storage::getPublicUrl('path/to/file.txt');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.