Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get image name and extension laravel

$file = $request->file('filename')->getClientOriginalName();

$filename = pathinfo($file, PATHINFO_FILENAME);
$extension = pathinfo($file, PATHINFO_EXTENSION);

// Please do comment if you have a better approach
// We all here to find shorter and faster way to get things done
// Thank you
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #image #extension #laravel
ADD COMMENT
Topic
Name
7+8 =