public function getStore($id) { $store = Store::select('stores.*')->join('products', 'products.store_id', '=', 'stores.id')->where('products.id', $id)->first(); return $store->name; }