Here is my syntax for getting the loaded filename with extension and getting only extension
$name = Input::file('photo')->getClientOriginalName();
$extension = Input::file('photo')->getClientOriginalExtension();
Here, if I upload a file with a name file.jpg. Then i will get
$name = file.jpg
$extension = jpg
Is there any predefined way to get just the file name, i.e. filewithout replacing any string. If you are not kind enough to offer a way to achieve str, replace it in some other way.
source
share