public function store($filePath, $shop, $imagePath) { $shopID = Shop::existsShop($shop)->id; $model = R::dispense('models'); $model->name = 'new'; $model->url = $filePath; $model->shop_id = $shopID; $model->image = $imagePath; return $id = R::store($model); }