You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
515 B

<?php
namespace App\Admin\Renderable;
use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;
use Faker\Factory;
class PostTable extends LazyRenderable
{
public function render()
{
$data = [];
$faker = Factory::create();
for ($i = 0; $i < 5; $i++) {
$data[] = [
$faker->title,
$faker->email,
$faker->date(),
];
}
return Table::make(['Title', 'Email', 'date'], $data);
}
}