Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

laravel get image extension

$extension = pathinfo(storage_path('/uploads/my_image.jpg'), PATHINFO_EXTENSION);
dd($extension);
Comment

PREVIOUS NEXT
Code Example
Php :: php filter array contain valu 
Php :: php add property to object 
Php :: import facade URL laravel 
Php :: hasone relation in laravel 
Php :: laravel eloquent get first 
Php :: create function php 
Php :: duplicate record laravel 
Php :: php array check value exists 
Php :: define constant in php 
Php :: eloquent pluck multiple columns 
Php :: how to use a session in blade 
Php :: hello world php 
Php :: how to collapse array in laravel 
Php :: laravel online hash password generator 
Php :: ACF Photo Gallery Output 
Php :: carbon now 
Php :: how to sum in laravel 
Php :: php read zip file without extracting 
Php :: how to get last id in database codeigniter 4 
Php :: php array append 
Php :: php shell_exec with root 
Php :: brew install php 5.6 
Php :: How to get the current taxonomy term ID (not the slug) in WordPress? 
Php :: woocommerce add to cart hook 
Php :: laravel migration table column nullable 
Php :: laravel search query 
Php :: laravel use function from another controller 
Php :: php date set utc hours 
Php :: remove empty array elements php 
Php :: php sort custom function 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =