I have created a custom disk such as
'custom-ftp' => [
'driver' => 'ftp',
'host' => 'imn.tra.de',
'username' => '',
'password' => '',
'port' => 21,
'ssl' => true,
],
but i want the username and password to be set by each user in my database and call the disk accordingly,
rightnow what i am doing is before uploading the file to ftp, im doing
$user = Auth::user();
$setting = $user->setting;
Config::set('filesystems.disk.custom-ftp.username', $setting->user_name);
Config::set('filesystems.disk.custom-ftp.password', $setting->password);
And later
Storage::disk('custom-ftp')->put($file, $localFile);
But i am getting Like this : Could not login with connection: imn.tra.de::21, username: as this is still picking the username from config where it is empty