abduljakul-salsalani's avatar

How to get the stored file name only after using built in store method for the uploaded_file trait

After using built in file upload store method, i want to get the stored file name only..

if($request->hasFile('photo')) { 

            $photo = $request->file('photo'); 

            $image = Image::make($photo)->resize(75,null,function($constraint){ 
                $constraint->aspectRatio() ; 
            })->encode('jpg',75) ; 

            $path =   $photo->store('medicines') ; ***I want to get only the file_name without the directory medicines***

            Storage::put('medicines/thumbs/'.$path->file_name) *** and store with the file_name method here.. Do laravel have a built in function here that accesses the file_name 

0 likes
1 reply

Please or to participate in this conversation.