dev-master
9999999-devLaravel package for generate html table
MIT
The Requires
by Aizhar Olexin
laravel html table aizhar777
v1.0
1.0.0.0Laravel package for generate html table
MIT
The Requires
by Aizhar Olexin
laravel html table aizhar777
Wallogit.com
2017 © Pedro Peláez
Laravel package for generate html table
Cell: The wrapper on a package of "donquixote/cellbrush" for Laravel, (*1)
Begin by installing the package through Composer., (*2)
composer require aizhar777/cell
Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:, (*3)
Aizhar777\Cell\CellServiceProvider::class,
'Cell' => Aizhar777\Cell\Facades\Cell::class,
A simple 3x3 table with the diagonal cells filled., (*4)
namespace App\Http\Controllers;
class TestController extends Controller
{
public function index()
{
$table = \Cell::create()
->addClass('table table-bordered')
->addRowNames(['row0', 'row1', 'row2'])
->addColNames(['col0', 'col1', 'col2'])
->td('row0', 'col0', 'Diag 0')
->td('row1', 'col1', 'Diag 1')
->td('row2', 'col2', 'Diag 2');
return view('test_view', ['table' => $table->render()]);
}
}
test_view.blade.php:, (*5)
{{ $table }}
| Diag 0 | ||
| Diag 1 | ||
| Diag 2 |
Groups can have unlimited depth., (*6)
$table = \Cell::create()
->addRowNames(['T', 'B.T', 'B.B.T', 'B.B.B'])
->addColNames(['L', 'R.L', 'R.R.L', 'R.R.R'])
->td('T', '', 'top')
->td('B', 'L', 'bottom left')
->td('B.T', 'R', 'B.T / R')
->td('B.B', 'R.L', 'B.B / R.L')
->td('B.B.T', 'R.R', 'B.B.T / R.R')
->td('B.B.B', 'R.R.L', 'B.B.B / R.R.L')
->td('B.B.B', 'R.R.R', 'B.B.B / R.R.R');
Result:, (*7)
| top | |||
| bottom left | B.T / R | ||
| B.B / R.L | B.B.T / R.R | ||
| B.B.B / R.R.L | B.B.B / R.R.R | ||
More examples, (*8)
donquixote/cellbrush, (*9)
Laravel package for generate html table
MIT
laravel html table aizhar777
Laravel package for generate html table
MIT
laravel html table aizhar777