PHP code example of robodocxs / laravel-erp-middleware
1. Go to this page and download the library: Download robodocxs/laravel-erp-middleware 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/ */
robodocxs / laravel-erp-middleware example snippets
Route::get('/api/example', function () {
// Your protected route logic here
})->middleware('auth.basic.once');
use Illuminate\Support\Facades\Storage;
$disk = Storage::disk('fileshare');
// Now you can use $disk to perform SFTP operations
$contents = $disk->get('file.txt');
$disk->put('file.txt', 'Contents');
use League\Csv\Reader;
$csv = Reader::createFromPath('/path/to/your/csv/file.csv', 'r');
$csv->setHeaderOffset(0);
foreach ($csv as $record) {
// Process each record
}
bash
php artisan laravel new robodocxs-middleware-something