LaravelPackages.net
Acme Inc.
Toggle sidebar
arcanedev/markup

PHP HTML Markup generator

443
5
1.2.0
About arcanedev/markup

arcanedev/markup is a Laravel package for php html markup generator. It currently has 5 GitHub stars and 443 downloads on Packagist (latest version 1.2.0). Install it with composer require arcanedev/markup. Discover more Laravel packages by arcanedev or browse all Laravel packages to compare alternatives.

Last updated

PHP HTML MARKUP Generator Packagist License

Travis Status Coverage Status Scrutinizer Code Quality Github Release Packagist Downloads Github Issues

By ARCANEDEV©

Create HTML tags and render them efficiently.

Requirements

PHP >= 5.4.0

Installation

###Composer

You can install the package via Composer. Add this to your composer.json:

{
    "require": {
        "arcanedev/markup": "~1.1"
    }
}

Then install it via composer install or composer update.

Laravel

After the installation, include the service provider within app/config/app.php.

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

And finally, add the facade alias to this same file at the bottom:

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

USAGE

To generate your title tag for example :

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

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

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

And There is more:

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>

Contribution

Any ideas are welcome. Feel free the submit any issues or pull requests.

TODO

  • [ ] Documentation
  • [ ] Examples
  • [x] More tests and code coverage
  • [x] Laravel Support (v4.2)
  • [ ] Laravel Support (v5.0)
  • [ ] Refactoring

License

Markup package is licenced under the MIT license.

Star History Chart