andreaselia / laravel-analytics

Analytics for the Laravel framework.
MIT License
165 stars 25 forks source link

Analytics Dashboard sources link is not correct #56

Closed edrisranjbar closed 5 months ago

edrisranjbar commented 5 months ago

because source does not have beginning protocols like http or https ; the links are being appended to the current URL of the analytics dashboard which in my case is site/admin/analytics.

here's an example:

<a href="google.com" target="_blank" class="hover:underline">
   google.com
</a>

Thanks for the great job.

andreaselia commented 5 months ago

Thanks for letting me know @edrisranjbar. Do you have any thoughts on my suggested fix for this below?

I'm thinking we just hardcode the https:// at the front since the URLs here shouldn't have any protocol at the point of being used here.

<a href="https://{{ $source->page }}" target="_blank" class="hover:underline">
    {{ $source->page }}
</a>
edrisranjbar commented 5 months ago

That would solve the issue; if the endpoint are not going to have the protocol in any case. yeah that works just fine.

andreaselia commented 5 months ago

@edrisranjbar this should now be in v1.17.0, and v2.0.0 if you're able to upgrade to v2 of the package with Laravel 11 support.