Show analytics data to the browser instead terminal
Closed this issue ยท 3 comments
devloaderltd commented
Hello,
There is no documentation about how to show analytics data in the dashboard. I mean I want to see those data in the dashboard. Currently I saw there is one method and which is terminal. How to do that? any idea?
msamgan commented
I will work on it once @nunomaduro releases the update with the publishing configuration. I had a PR made but retracted that for the same reason.
thinkverse commented
You can always get the values directly from the database using the DB
facade or create an Eloquent model and create your view to display the information. ๐คทโโ๏ธ
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Analytics extends Model
{
protected $table = 'pan_analytics';
}
msamgan commented
if you want to do it in your project
use Pan\Contracts\AnalyticsRepository;
// Use this in your controller via dependency injection.
AnalyticsRepository $analytics
// This will give you all the data array.
$analytics = $analytics->all();