how to get file extension in laravel

Solutions on MaxInterview for how to get file extension in laravel by the best coders in the world

showing results for - "how to get file extension in laravel"
Clea
16 Jul 2018
1$extension = pathinfo(storage_path('/uploads/my_image.jpg'), PATHINFO_EXTENSION);dd($extension);
Caterina
26 Jul 2017
1//Where $file is an instance of Illuminate\Http\UploadFile
2$extension = $file->getClientOriginalExtension();
3