Leaf PHP

functions.php

Table of Contents

Functions

assets()  : mixed
Import an asset
view()  : string
Return a view
render()  : mixed
Render a view
redirect()  : mixed
Redirect to a given url
route()  : mixed
Get a route by name
vite()  : mixed
Get a route by name

Functions

assets()

Import an asset

assets([string $assets = '' ]) : mixed
Parameters
$assets : string = ''

The asset to import

view()

Return a view

view(string $view[, array<string|int, mixed>|object $data = [] ]) : string
Parameters
$view : string

The view to render

$data : array<string|int, mixed>|object = []

The data to pass to the view

Return values
string

render()

Render a view

render(string $view[, array<string|int, mixed>|object $data = [] ]) : mixed
Parameters
$view : string

The view to render

$data : array<string|int, mixed>|object = []

The data to pass to the view

redirect()

Redirect to a given url

redirect(string $url) : mixed
Parameters
$url : string

The url to redirect to

vite()

Get a route by name

vite(mixed $files[, string $baseDir = 'app/views' ]) : mixed
Parameters
$files : mixed
$baseDir : string = 'app/views'

The base directory to look for the file(s)


        
On this page

Search results