Base Frontend Components
Abstract base Livewire components in LaraDashboard that handle data loading, queries and SEO, so theme components only override render().
Base Frontend Components
LaraDashboard provides abstract base Livewire components that handle data loading, query logic, and SEO construction. Theme components extend these and override only render().
BaseFrontendPage
Class: App\Livewire\Pages\BaseFrontendPage
Abstract base for all frontend page components.
Protected Methods
| Method | Returns | Description |
|---|---|---|
query() |
FrontendQueryService |
Access query service |
seo() |
SeoHelper |
Access SEO helper |
renderWithLayout(view, seoParams, viewData) |
View |
Render with theme layout |
resolveLayout() |
string |
Resolve the layout view path |
Layout Resolution
resolveLayout() determines the layout in this order:
$this->layoutViewproperty (if set)Theme::active()+::layouts.app- Inferred from component namespace (e.g.
Modules\Starter26\...→starter26::layouts.app) - Fallback:
layouts.app
BaseHomePage
Extends: BaseFrontendPage
| Property | Type | Description |
|---|---|---|
$page |
?Post |
The homepage post |
mount(): Calls query()->findHomepage().
BaseContentPage
Extends: BaseFrontendPage
| Property | Type | Description |
|---|---|---|
$page |
?Post |
The page post |
mount(string $slug): Calls query()->findPublishedPageBySlug($slug).
BaseSinglePost
Extends: BaseFrontendPage
| Property | Type | Description |
|---|---|---|
$post |
?Post |
The post |
$relatedPosts |
Collection|array |
Related posts |
$previousPost |
?Post |
Previous post by date |
$nextPost |
?Post |
Next post by date |
mount(string $slug): Loads post, related posts, and adjacent posts.
BasePostsArchive
Extends: BaseFrontendPage (uses WithPagination)
| Property | Type | Description |
|---|---|---|
$search |
string |
Search query (#[Url(as: 'q')]) |
$category |
string |
Category filter (#[Url]) |
$sort |
string |
Sort order (#[Url]) |
$categories |
array |
Available categories |
$blogPage |
?Post |
Blog listing page |
Computed: $this->posts — paginated, filtered post results.
Actions: clearFilters() — resets all filters.
BaseTaxonomyArchive
Extends: BaseFrontendPage (uses WithPagination)
| Property | Type | Description |
|---|---|---|
$term |
?Term |
The taxonomy term |
Configuration: Set protected string $taxonomy = 'category' in subclass.
Computed: $this->posts — paginated posts for this term.
BaseSearchPage
Extends: BaseFrontendPage (uses WithPagination)
| Property | Type | Description |
|---|---|---|
$query |
string |
Search query (#[Url(as: 'q')]) |
Computed: $this->results — paginated search results.
Actions: clearSearch() — clears the search query.
BasePostsListing
Class: App\Livewire\Components\BasePostsListing
Reusable embeddable listing component for block-based pages.
| Property | Type | Default | Description |
|---|---|---|---|
$postsPerPage |
int |
12 |
Posts per page |
$columns |
int |
3 |
Grid columns |
$showSearch |
bool |
true |
Show search input |
$showCategoryFilter |
bool |
true |
Show category filter |
$showSort |
bool |
true |
Show sort dropdown |
$showExcerpt |
bool |
true |
Show post excerpts |
$showImage |
bool |
true |
Show featured images |
$showDate |
bool |
true |
Show post dates |
$categorySlug |
string |
'' |
Pre-filter by category |
$postRoute |
string |
'' |
Route name for post links |
All props are configurable via mount() parameters from the block builder.