-
-
Save jasonvarga/996caf5f9a1199eba88fc4c5200ea2d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// line 6 | |
use Stringy\Stringy; | |
// line 472 | |
public function upload(UploadedFile $file) | |
{ | |
$ext = $file->getClientOriginalExtension(); | |
$filename = $this->getSafeFilename(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME)); | |
$basename = $filename . '.' . $ext; | |
// line ~499 | |
private function getSafeFilename($string) | |
{ | |
return (string) Stringy::create($string)->toAscii()->replace(' ', '-'); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment