PHP code example of arce / html

1. Go to this page and download the library: Download arce/html 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/ */

    

arce / html example snippets


'providers' => [
    // ...
    Styde\Html\HtmlServiceProvider::class,
    // ...
],

// For Laravel 5.4 and later
protected $middlewareGroups = [
    // For Laravel 5.8 and later this needs to be after the StartSession middleware
    \Styde\Html\Alert\Middleware::class,
    //...
];

// For Laravel 5.3, 5.2, 5.1
protected $middleware = [
    //...
    \Styde\Html\Alert\Middleware::class,
    //...
];

Alert => Styde\Html\Facades\Alert
Field => Styde\Html\Facades\Field
Menu  => Styde\Html\Facades\Menu
Form  => Collective\Html\FormFacade
Html  => Collective\Html\HtmlFacade

'aliases' => [
    // ...
    'Access' => Styde\Html\Facades\Access::class,
    // ...
],

//config/html.php
return [
    'novalidate' => true
];

$options = [
    'php' => 'PHP',
    'js' => 'JS'
];
$checked = ['php'];

Alert::info('Your account is about to expire')
    ->details('Renew now to learn about:')
    ->items(['Laravel', 'PHP', 'And more!'])
    ->button('Renew now!', url('renew'), 'primary');

alert('this is the message', 'type-of-message')

menu($items, $classes)

//config/html.php
return [
    'theme' => 'your-theme-here'
];

//config/html.php
return [
    //…
    'translate_texts' => false
    //…
];
zsh
php artisan vendor:publish --provider='Styde\Html\HtmlServiceProvider'
zsh
php artisan vendor:publish