Skip to content

Commit 264bc92

Browse files
Merge branch 'main' of github.com:paulo-hortelan/requests-graph-pulse
2 parents 39c43e3 + a4f7556 commit 264bc92

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
github: paulo-hortelan
2+
ko_fi: paulohortelan

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/paulo-hortelan/requests-graph-pulse/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/paulo-hortelan/requests-graph-pulse/actions?query=workflow%3Arun-tests+branch%3Amain)
77
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/paulo-hortelan/requests-graph-pulse/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/paulo-hortelan/requests-graph-pulse/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
88
[![Total Downloads](https://img.shields.io/packagist/dt/paulo-hortelan/requests-graph-pulse.svg?style=flat-square)](https://packagist.org/packages/paulo-hortelan/requests-graph-pulse)
9+
[![Ko-fi](https://img.shields.io/badge/Ko--fi-Buy%20me%20a%20coffee!-%2346b798.svg)](https://ko-fi.com/paulohortelan)
910

1011
Credits to [Aaron Francis](https://github.com/aarondfrancis) for his Pulse tutorial.
1112

@@ -87,4 +88,4 @@ Please review [our security policy](../../security/policy) on how to report secu
8788

8889
## License
8990

90-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
91+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

resources/views/livewire/requests-graph.blade.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,19 @@
5050
<div wire:key="requests-graph">
5151

5252
@php
53-
function hightestValue($data){
54-
$highest = 0;
55-
56-
foreach($data as $item) {
57-
$max = max($item);
58-
$highest = $max > $highest ? $max : $highest;
53+
if(!function_exists('hightestValue')){
54+
function hightestValue($data){
55+
$highest = 0;
56+
57+
foreach($data as $item) {
58+
$max = max($item);
59+
$highest = $max > $highest ? $max : $highest;
60+
}
61+
62+
return $highest;
5963
}
60-
61-
return $highest;
6264
}
65+
6366
6467
$highest = hightestValue($request->toArray());
6568
@endphp
@@ -252,4 +255,4 @@ class="h-52 ring-1 ring-gray-900/5 dark:ring-gray-100/10 bg-gray-50 dark:bg-gray
252255
}
253256
}))
254257
</script>
255-
@endscript
258+
@endscript

src/RequestsGraphServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function boot(): void
2121
{
2222
parent::boot();
2323

24-
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'requests-graph');
24+
$this->loadViewsFrom(__DIR__.'/../resources/views', 'requests-graph');
2525

2626
$this->callAfterResolving('livewire', function (LivewireManager $livewire, Application $app) {
2727
$livewire->component('requests-graph', RequestsGraph::class);

0 commit comments

Comments
 (0)