2017 © Pedro Peláez
 

library laravel-sentry

Record visitor views on articles/project or your site with extra details for monitoring.

image

goper-leo/laravel-sentry

Record visitor views on articles/project or your site with extra details for monitoring.

  • Friday, October 6, 2017
  • by goper-leo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Sentry

This is not an integration of Sentry.

This is a Laravel package for recording visitor on your articles, project or any page in your application. It will save on the database the visitor/user who view page on your app with their details like location, ip address, browser, machine etc., (*1)

Installation

  • Install the goper-leo/laravel-sentry:
composer require goper-leo/laravel-sentry

or add to your composer.json, (*2)

"goper-leo/laravel-sentry": "dev-master"

and run composer update, (*3)

  • Add the configuration for the package run php artisan vendor:publish --provider=SentryServiceProvider, (*4)

  • After vendor publish create the table on your database run php artisan migrate the table will be named sentries, (*5)

If you're on Laravel 5.4 or earlier, you'll need to add the following to your config/app/php, (*6)

'providers' => array(
    EETechMedia\Sentry\SentryServiceProvider::class,
)
'aliases' => array(
    'Sentry' => EETechMedia\Sentry\SentryFacade::class,
)

Usage

Add the facade on your controller, (*7)

use Sentry;

Sentry columns - base_id = Your point or source this only allow integer value - this could be page id , project_id or any point. This can be null., (*8)

  • url = If you don't use base_id use url as your point / primary key. This is string value, this can be null also.

Note: base_id and url cannot be both null, there must be at least one of the both will have a value. To make your primary key or point of reference., (*9)

To add user/viewer simply put on your controller, (*10)

$viewer = [
    'base_id' => 'point_id',
    'url' => 'lorem-ipsum'
];

Sentry::plant($viewer);

To fetch / get data of all viewers, (*11)

Sentry::getAll();
or
Sentry::getAll('base_id-or-url'); // To get all records accoring to condition

Other methods - getWhere - getObserverSpot - getObserverHeaders, (*12)

The Versions

06/10 2017

dev-master

9999999-dev

Record visitor views on articles/project or your site with extra details for monitoring.

  Sources   Download

MIT

The Requires

 

by Goper Zosa

laravel sentry laravel sentry goper user view laravel user view

06/10 2017

dev-add-license-1

dev-add-license-1

Record visitor views on articles/project or your site with extra details for monitoring.

  Sources   Download

MIT

The Requires

 

by Goper Zosa

laravel sentry laravel sentry goper user view laravel user view