$imageName = $studentPortfolios[$i]->portfolio_link; // this returns the file name stored in the DB
Storage::disk('s3')->delete('s3_folder_path/'. $imageName);
use AwsS3S3Client;
use AwsS3ExceptionS3Exception;
$bucket = "bucket";
$keyname = "keyname";
$s3 = new S3Client([
'version' => 'latest',
'region' => 'region'
]);
$result = $s3->deleteObject(array(
'Bucket' => $bucket,
'Key' => $keyname
));