File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed
Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 2020 ],
2121 "require" : {
2222 "php" : " ^8.0" ,
23- "filament/filament" : " ^3.0 || 3.0-stable " ,
24- "illuminate/http" : " ^9.0 || ^10.0" ,
25- "illuminate/support" : " ^9.0 || ^10.0"
23+ "filament/filament" : " ^3.0" ,
24+ "illuminate/http" : " ^9.0| ^10.0|^11 .0" ,
25+ "illuminate/support" : " ^9.0| ^10.0|^11 .0"
2626 },
2727 "autoload" : {
2828 "psr-4" : {
Original file line number Diff line number Diff line change 1515 ],
1616
1717 'footer ' => [
18- 'view_more ' => 'View more ' ,
18+ 'view_more ' => 'View more statistics ' ,
1919 'statistics_by ' => 'Statistics by ' ,
2020 ],
2121];
Original file line number Diff line number Diff line change 1515 ],
1616
1717 'footer ' => [
18- 'view_more ' => 'Guarda di più ' ,
18+ 'view_more ' => 'Guarda più statistiche ' ,
1919 'statistics_by ' => 'Statistiche da ' ,
2020 ],
2121];
Original file line number Diff line number Diff line change 44
55use DaniloPolani \FilamentPlausibleWidget \Clients \PlausibleClient ;
66use Filament \Widgets \ChartWidget ;
7+ use Illuminate \Contracts \Support \Htmlable ;
78use Illuminate \Support \Carbon ;
89use Illuminate \Support \Collection ;
910use Illuminate \Support \Facades \Cache ;
1011use Illuminate \Support \Facades \Config ;
12+ use Illuminate \Support \HtmlString ;
1113
1214class PlausibleWidget extends ChartWidget
1315{
@@ -25,6 +27,16 @@ public function getHeading(): string
2527 return __ ('filament-plausible-widget::widget.header.visitors ' );
2628 }
2729
30+ public function getDescription (): string |Htmlable |null
31+ {
32+ return new HtmlString (sprintf (
33+ '<a href="https://plausible.io/%s" target="_blank" class="text-primary-600 dark:text-primary-400">%s %s</a> ' ,
34+ Config::get ('filament-plausible-widget.site_id ' ),
35+ __ ('filament-plausible-widget::widget.footer.view_more ' ),
36+ svg ('heroicon-o-arrow-top-right-on-square ' , 'w-3 h-3 inline-block ' )->toHtml (),
37+ ));
38+ }
39+
2840 protected function getType (): string
2941 {
3042 return 'line ' ;
You can’t perform that action at this time.
0 commit comments