So i've got the following code, but for some reason the use
statement doesn't seem to do anything.
class Image {
use \App\Traits\File;
public static function get()
{
$image_url = File::getVersion()
}
}
Throws an error Uncaught Error: Class 'File' not found
. But it works if I change it to $image_url = \App\Traits\File::getVersion()
.
Does anyone know why?