/** * Finds a Product by it's slug * * @param string * @return Product * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function findBySlug($slug) { return Product::whereSlug($slug)->with('current_price.discount', 'options.selections', 'inventories.selections', 'thumbnails', 'images')->firstOrFail(); }