Q:

Duplicating an image from a file path, changing name and saving it to a different table in laravel

I have a file path on a table, what I am trying to do is create the image from the file path and then save the 'new' file with a different name.  
Because I have only the file path, I do not now how to create the image object so that I can then getClientOriginalExtension(); and save that to the database.  I have tried the following:
$img = $var->image_path;
$file = file_get_contents($img);
$filename = time() . '.' .  $file->getExtension();

Image::make($file)->resize(300, 300)->save( public_path('/test' .  $filename ) );

However the script errors: Call to a member function getExtension() on string what would be the right way with the file path, create the object, change the name of the file, ensure the right extension is set (maybe outside scope of this q) and then save the newly created image to a different folder and save the newly created image path to the database.  
I hope that makes sense.  
Update: should I use file_put_contents() instead? 

A:

Achieved what I wanted using the copy() and iterating over each image and adjusting the image relatively.  
$title = $var->name;
$string = str_replace(' ', '-', $title); // Replaces all spaces with hyphens. 
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. 

copy($img, public_path('/test' .  $string .  time()));

http://php.net/manual/en/function.copy.php

