blumilksoftware / laravel-heatmap

Heatmaps in Laravel in easy way.
0 stars 0 forks source link

Blade components #3

Open krzysztofrewak opened 4 weeks ago

krzysztofrewak commented 4 weeks ago

I would like use simple components in my Blade views:

So in BookController.php it could look like this:

public function __invoke(): View
{
    $builder = new LaravelHeatmapBuilder(arrayAccessIndex: "read_at");
    $result = $builder->build(Book::class);

    return view("books")->with("heatmap", $heatmap);
}

And in book.blade.php like this:

<x-heatmap:heatmap :heatmap=$heatmap></x-heatmap>