I am using Idiorm and looking to update a row with the column name 'path' in
$image = ORM::for_table('shop_product_images')->find_one($productId);
$image->path = '/img/shop/products/'.$name;
$image->save();
However when this is ran, the response error is:
Fatal error: Class 'Controller\ORM' not found
Which points to the top line of the query.
I should note that a create query works correctly:
$image = \ORM::for_table('shop_product_images')->create();
$image->productId = $productId;
$image->path = '/img/shop/products/'.$name;
$image->save();