PHP code example of orivex-x / elemento
1. Go to this page and download the library: Download orivex-x/elemento library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
orivex-x / elemento example snippets
use Elemento\Elemento;
session_start();
$form = Elemento::postForm('/login')
->withCSRFToken(Elemento::csrf())
->setRenderOptions([
'wrapper_class' => 'field',
'error_class' => 'field-error',
]);
$form->field('email', 'email', [
'label' => 'Email address',
'placeholder' => '[email protected] ',
'
use Elemento\Elemento;
use Elemento\Theme\BootstrapTheme;
Elemento::setTheme(new BootstrapTheme());
$overview = Elemento::div(['class' => 'row g-4'])->add([
Elemento::div(['class' => 'col-md-4'])->add(
Elemento::card('Monthly revenue', '£12,480 · ↑ 18.2%')
),
Elemento::div(['class' => 'col-md-4'])->add(
Elemento::card('Active teams', '284 · ↑ 12 this week')
),
Elemento::div(['class' => 'col-md-4'])->add(
Elemento::card('Uptime', '99.99% · All systems normal')
),
]);
echo $overview;
use Elemento\SafeHtml;
echo Elemento::div()->trustedHtml(new SafeHtml('<strong>Verified markup</strong>'));