PHP code example of arcanedev / markup

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

    

arcanedev / markup example snippets


'providers' => [
    ...
    'Arcanedev\Markup\Laravel\ServiceProvider',
];

'aliases' => [
    ...
    'Markup' => 'Arcanedev\Markup\Laravel\Facade',
];

$title = Markup::title('Hello world');
echo $title->render()

// or 
echo Markup::title('Hello world');

// The result: <title>Hello world</title>

echo Markup::img('img/logo.png', 'alt Logo', ['class' => 'logo img-responsive']);
// Result : <img src="img/logo.png" alt="alt Logo" class="logo img-responsive"/> 

echo Markup::meta('property', 'og:description', 'Site web description');
// Result : <meta property="og:description" content="Site web description"/>

echo Markup::link('page/about-us', 'About us', ['class' => 'btn btn-info']);
// Result : <a href="page/about-us" class="btn btn-info">About us</a>

echo Markup::style('assets/css/style.css', ['media' => 'all']);
// Result : <link rel="stylesheet" href="assets/css/style.css" type="text/css" media="all"/>

echo Markup::script('assets/js/app.js');
// Result : <script src="assets/js/app.js"></script>