URL Helpers
Always use these helpers instead of calling route() directly. If the core ever renames a route, only the helper needs updating — not your theme files.
// All helpers are globally available in any Blade template or PHP file
theme_home_url() // Homepage
theme_shop_url() // Shop listing page
theme_cart_url() // Cart page
theme_wishlist_url() // Wishlist page
theme_checkout_url() // Checkout page
theme_order_track_url() // Order tracking page
theme_product_url($slug) // Any product or dynamic-slug page
theme_asset($path) // Theme asset URL with fallback
Auth URL Helpers
theme_is_logged_in() // bool — is the front-end user authenticated?
theme_auth() // The auth guard — call ->check(), ->id(), etc.
theme_current_user() // Authenticated User model or null
theme_login_url() // Login page URL
theme_register_url() // Registration page URL
theme_logout_url() // Logout URL
theme_user_dashboard_url() // User dashboard URL
Usage example
@if(theme_is_logged_in())
<a href="{{ theme_user_dashboard_url() }}">{{ theme_current_user()->name }}</a>
<a href="{{ theme_logout_url() }}">Sign Out</a>
@else
<a href="{{ theme_login_url() }}">Sign In</a>
<a href="{{ theme_register_url() }}">Register</a>
@endif
Auth Page Content Helpers
These helpers read page copy from Admin → General Settings → Login & Register Page. Every helper has a smart fallback so pages are never blank out of the box.
| Function | Returns | Static Option Key | Fallback |
|---|---|---|---|
theme_login_page_headline() | string | login_page_headline | "{site_name} Account" |
theme_login_page_subtitle() | string | login_page_subtitle | "Welcome back. Sign in to access your account." |
theme_login_page_features() | string[] | login_page_feature_1/2/3 | 3 default translated bullets |
theme_register_page_headline() | string | register_page_headline | "Join {site_name}" |
theme_register_page_subtitle() | string | register_page_subtitle | "Get access to exclusive deals…" |
theme_register_page_promo_text() | string | register_page_promo_text | "Members get exclusive pricing…" |
theme_login_page() | array | — | Keys: headline, subtitle, features |
theme_register_page() | array | — | Keys: headline, subtitle, promo_text |
Usage in login.blade.php
<h2>{{ theme_login_page_headline() }}</h2>
<p>{{ theme_login_page_subtitle() }}</p>
<ul>
@foreach(theme_login_page_features() as $feature)
<li>{{ $feature }}</li>
@endforeach
</ul>
Usage in register.blade.php
<h2>{{ theme_register_page_headline() }}</h2>
<p>{{ theme_register_page_subtitle() }}</p>
<p>{{ theme_register_page_promo_text() }}</p>
Shop URL Helpers
AJAX endpoint helpers for cart, wishlist, review, and compare operations:
theme_add_to_cart_url() // POST — add product to cart
theme_add_to_wishlist_url() // POST — add product to wishlist
theme_buy_now_url() // POST — buy now (redirect to checkout)
theme_quick_view_url() // GET — product quick view modal
theme_product_review_url() // POST — submit a product review
theme_product_review_more_url() // GET — load more reviews (AJAX)
theme_add_to_compare_url() // POST — add to compare list
theme_cart_update_url() // GET — update cart item quantity
theme_cart_remove_url() // GET — remove item from cart
theme_cart_clear_url() // GET — clear entire cart
theme_wishlist_remove_url() // GET — remove item from wishlist
theme_wishlist_move_url() // GET — move wishlist item to cart
theme_checkout_state_url() // GET — fetch states for country (AJAX)
theme_apply_coupon_url() // POST — apply coupon code
CSRF helper
theme_csrf() // Token string — use in AJAX data: { _token: '{{ theme_csrf() }}' }
theme_csrf_field() // Full hidden input HTML — use in forms: {!! theme_csrf_field() !!}
Blog URL Helpers
theme_blog_search_url() // POST — blog search form action
theme_blog_comment_store_url() // POST — submit a comment (AJAX)
theme_blog_load_comments_url() // POST — load more comments (AJAX)
theme_blog_tag_url($tag) // Tag archive URL (auto-slugifies)
theme_blog_category_url($slug) // Category archive URL
Rendering Helpers
theme_price($amount) // "$ 29.99" — formatted with tenant currency
theme_product_image($id, $size) // Image URL string or null. Sizes: 'grid', 'full', 'thumb'
theme_star_rating($product) // Star rating HTML markup string
theme_product_price($product) // Array: regular_price, sale_price, discount, campaign_name
theme_share_links($url, $title) // Social share links HTML
theme_render_image($id, $class, $size) // Full <img> tag HTML
theme_static_option($key) // Tenant setting value by key
Still stuck?
Our support team is ready to help you get set up.

