Skip to content

Lara-App Theme Developer Guide

  • Quick Start


    Build your first theme in under 15 minutes with a step-by-step guide.

    Build Your First Theme

  • Theme Architecture


    Understand directory layout, the skeleton theme, and Blade layout sections.

    Architecture Guide

  • Helper Functions


    Reference all available global PHP helpers: assets, products, menus, and more.

    Helpers Reference

  • Pages Reference


    Full variable and template reference for every supported page.

    Pages Reference

What is this?

This documentation describes how to create a frontend theme for the lara-app Laravel e-commerce platform. If you're familiar with Blade templating (Laravel's default template engine), you have everything you need to get started.

The application uses a multi-tenant, theme-based architecture. Each site can have its own theme, and themes can be swapped without touching the backend PHP code. As a theme developer, your job is to create the HTML structure and consume data through the provided helper functions.

Compared to the Legacy Laminas/Twig Theme

If you previously developed for the legacy Laminas/Twig platform, here's the paradigm shift:

Aspect Legacy (Twig) New (Blade)
File extension .twig .blade.php
Echo variable {{ variable }} {{ $variable }}
Raw/unescaped {{ variable \| raw }} {!! $variable !!}
Loop {% for item in items %} @foreach($items as $item)
Conditional {% if condition %} @if($condition)
Template include {% include 'partial/header.twig' %} @include('partial.header')
Template extend {% extends 'layout.twig' %} @extends('layout.layout')
Section define {% block content %} @section('content')

Blade is PHP

Unlike Twig, Blade templates allow raw PHP using the @php directive. This means you can call any helper function from theme_helpers.php directly in your template.

Architecture Overview

lara-app/resources/views/
├── layout/              ← Your main layout (master.blade.php) - controlled by theme
├── template/            ← Page-specific templates (product_details.blade.php, etc.)
├── partial/             ← Reusable sub-components (productslider.blade.php, etc.)
└── Modules/.../views/   ← Module-specific views (login.blade.php, register.blade.php, etc.)

The layout file is the outermost wrapper. All page templates @extend it, and inject content into named @section slots.