Linux lionsclub 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.29 (Ubuntu)
: 161.35.52.75 | : 3.131.90.193
Cant Read [ /etc/named.conf ]
7.4.28
www-data
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
lionsclub /
core /
app /
Console /
Commands /
[ HOME SHELL ]
Name
Size
Permission
Action
ImportCSV.php
1.38
KB
-rw-r--r--
UpdateMemberDates.php
1.94
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ImportCSV.php
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; use League\Csv\Reader; // Ensure you have league/csv installed via Composer class ImportCSV extends Command { protected $signature = 'import:csv {path}'; protected $description = 'Imports a CSV file into the database'; public function __construct() { parent::__construct(); } public function handle() { $path = $this->argument('path'); if (!file_exists($path) || !is_readable($path)) { $this->error('CSV file does not exist or is not readable'); return; } $csv = Reader::createFromPath($path, 'r'); $csv->setHeaderOffset(0); // Assumes the first row of the CSV is the header $records = $csv->getRecords(); // Get all records from the CSV foreach ($records as $record) { foreach ($record as $key => $value) { $record[$key] = trim($value); } DB::table('members')->insert([ 'district' => $record['district'], 'full_name' => $record['name'], 'email_id' => $record['email'], 'mobile_numbers' => $record['mobile_numbers'], 'position' => $record['position'], ]); } $this->info('CSV data has been imported successfully!'); } }
Close