helpers.php
Global helper functions for LWT.
These functions are available throughout the application and provide convenient shortcuts for common operations.
PHP version 8.1
Tags
Table of Contents
Functions
- url() : string
- Generate a URL with the application base path prepended.
- base_path() : string
- Get the configured application base path.
Functions
url()
Generate a URL with the application base path prepended.
url([string $path = '/' ]) : string
Use this for all internal links to ensure they work correctly when the application is installed in a subdirectory.
Parameters
- $path : string = '/'
-
The path to generate URL for (should start with /)
Tags
Return values
string —The full URL path with base path prepended
base_path()
Get the configured application base path.
base_path() : string
Return values
string —The base path (e.g., '/lwt') or empty string for root