Xgenious/ docs
Products
Get support

Wrapper: Blog\Post

Wraps a Blog model. Available as items in theme_blogs() and as theme_post() on the single page.

  • id() → int — Blog post ID
  • title() → string — Sanitized title string
  • url() → string — Full URL to the blog post
  • slug() → string — Post slug
  • content() → string — Full HTML content (use {"{!! !!}"})
  • excerpt($words = 20) → string — Truncated plain-text excerpt
  • image_url($size = 'grid') → ?string — Featured image URL or null. Sizes: grid, full, thumb
  • image_tag($size, $class) → string — Full <img> HTML tag
  • author() → string — Author display name
  • date($format = 'M d, Y') → string — Formatted publish date
  • comment_count() → int — Number of approved comments
  • comment_url() → string — URL anchored to comment section
  • category() → ?Blog\Category — Category wrapper or null
  • tags() → Tag[] — Array of Tag wrappers
  • comments() → Comment[] — Top-level Comment wrappers
  • share_links() → string — Social share buttons HTML
  • has_image() → bool — Post has a featured image
  • has_comments() → bool — Post has at least one comment
  • has_tags() → bool — Post has tags
  • raw() → Blog — Underlying Blog Eloquent model

Wrapper: Blog\Category

  • id() → int — Category ID
  • name() → string — Category display name
  • url() → string — Category archive URL
  • slug() → string — Category slug
  • count() → int — Number of posts in category

Wrapper: Blog\Tag

  • name() → string — Tag display name
  • slug() → string — URL-safe slug
  • url() → string — Tag archive URL

Wrapper: Blog\Comment

  • id() → int — Comment ID
  • author() → string — Commenter display name
  • author_avatar() → string — Avatar <img> tag HTML
  • body() → string — Comment text (use {"{!! !!}"})
  • date($format = 'd F Y') → string — Formatted comment date
  • can_reply() → bool — Current user can reply to this comment
  • replies() → Comment[] — Child Comment wrappers
  • has_replies() → bool — Comment has child replies

Wrapper: Shop\Product

  • id() → int — Product ID
  • name($words = 0) → string — Product name, optionally truncated to N words
  • url() → string — Product detail page URL
  • slug() → string — Product slug
  • summary() → string — Short summary text
  • description() → string — Full description HTML
  • image_url($size = 'grid') → ?string — Main image URL or null
  • image_tag($size, $class) → string — Full <img> tag HTML
  • gallery_urls($size) → string[] — Array of gallery image URLs
  • price() → string — Formatted sale/campaign price e.g. "$ 29.99"
  • regular_price() → ?string — Formatted original price or null if no discount
  • sale_price_raw() → float — Numeric sale price
  • discount() → ?string — Discount percentage string e.g. "20" or null
  • is_on_sale() → bool — Product has an active discount
  • campaign_name() → ?string — Active campaign label or null
  • has_campaign() → bool — Product is in an active campaign
  • badge() → ?string — Badge label string or null
  • stock() → int — Available stock count
  • in_stock() → bool — Product is available
  • star_rating() → string — Star rating HTML markup
  • category() → ?ProductCategory — Primary ProductCategory wrapper
  • add_to_cart_url() → string — AJAX add-to-cart endpoint
  • add_to_wishlist_url() → string — AJAX add-to-wishlist endpoint
  • buy_now_url() → string — AJAX buy-now endpoint
  • has_image() → bool — Product has a main image
  • is_refundable() → bool — Product is eligible for refund
  • raw() → object — Underlying Product Eloquent model

Wrapper: Shop\ProductCategory

  • id() → int — Category ID
  • name() → string — Category display name
  • url() → string — Category page URL
  • slug() → string — Category slug
  • count() → int — Number of products in category
  • image_url($size) → ?string — Category image URL or null
Still stuck?
Our support team is ready to help you get set up.
Get support