Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 

README.md

Bootstrap PHP

A highly extendable PHP library that generate and prints html for bootstrap.

Installation

$ composer require lodev09/bootstrap-php

Built-in Components

The library has built-in components that are already available for you to use. See creating custom components to learn more on how to create your own component.

  • Table - Print tables from datasource
  • Button - Print simple buttons
  • Select - Print select from datasource
  • Alert - Print alert
  • Input - Print input (text, password, etc)

If you want me to add your own component, feel free to contribute and submit a PR!

Usage

use \Bootstrap\Components\Table;

// somewhere in your project.
// sample data from your db
$data = [
    ['name' => 'Jovanni Lo', 'email' => 'lodev09@gmail.com'],
    ['name' => 'foo', 'email' => 'bar@email.com']
];

$table = new Table($data);
$table->cell = [
    'name' => [
        'class' => 'text-primary',
        'url' => '#docs',
        // ... so much more
    ],
    // can also be a closure
    'username' => function($row, $index, $value) {
        // print_r($row)
        return '<strong>@'.$row['username'].'</strong>';
    }
];

// print the html
$table->printHtml();

Feedback

All bugs, feature requests, pull requests, feedback, etc., are welcome. Visit my site at www.lodev09.com or LICENSE MIT

Credits

© 2018 - Coded by Jovanni Lo / @lodev09

License

Released under the LICENSE MIT See LICENSE file.

About

A PHP library that prints html for bootstrap

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.