├── .github
└── FUNDING.yml
├── .gitignore
├── .travis.yml
├── LICENSE.md
├── README.md
├── composer.json
├── config
└── larametrics.php
├── database
└── migrations
│ ├── 2018_06_01_000000_create_larametrics_models_table.php
│ ├── 2018_07_01_000000_create_larametrics_requests_table.php
│ ├── 2018_07_28_000000_create_larametrics_logs_table.php
│ ├── 2018_08_02_000000_create_larametrics_notifications_table.php
│ └── 2020_01_09_000000_add_user_id_column_to_larametrics_models_table.php
├── phpunit.xml
├── resources
├── assets
│ ├── css
│ │ └── tabler.css
│ ├── fonts
│ │ └── feather
│ │ │ ├── feather-webfont.eot
│ │ │ ├── feather-webfont.svg
│ │ │ ├── feather-webfont.ttf
│ │ │ └── feather-webfont.woff
│ ├── images
│ │ ├── browsers
│ │ │ ├── android-browser.svg
│ │ │ ├── aol-explorer.svg
│ │ │ ├── blackberry.svg
│ │ │ ├── camino.svg
│ │ │ ├── chrome.svg
│ │ │ ├── chromium.svg
│ │ │ ├── dolphin.svg
│ │ │ ├── edge.svg
│ │ │ ├── firefox.svg
│ │ │ ├── ie.svg
│ │ │ ├── maxthon.svg
│ │ │ ├── mozilla.svg
│ │ │ ├── netscape.svg
│ │ │ ├── opera.svg
│ │ │ ├── safari.svg
│ │ │ ├── sleipnir.svg
│ │ │ ├── uc-browser.svg
│ │ │ └── vivaldi.svg
│ │ ├── crypto-currencies
│ │ │ ├── bitcoin.svg
│ │ │ ├── cardano.svg
│ │ │ ├── dash.svg
│ │ │ ├── eos.svg
│ │ │ ├── ethereum.svg
│ │ │ ├── litecoin.svg
│ │ │ ├── nem.svg
│ │ │ └── ripple.svg
│ │ ├── flags
│ │ │ ├── ad.svg
│ │ │ ├── ae.svg
│ │ │ ├── af.svg
│ │ │ ├── ag.svg
│ │ │ ├── ai.svg
│ │ │ ├── al.svg
│ │ │ ├── am.svg
│ │ │ ├── ao.svg
│ │ │ ├── aq.svg
│ │ │ ├── ar.svg
│ │ │ ├── as.svg
│ │ │ ├── at.svg
│ │ │ ├── au.svg
│ │ │ ├── aw.svg
│ │ │ ├── ax.svg
│ │ │ ├── az.svg
│ │ │ ├── ba.svg
│ │ │ ├── bb.svg
│ │ │ ├── bd.svg
│ │ │ ├── be.svg
│ │ │ ├── bf.svg
│ │ │ ├── bg.svg
│ │ │ ├── bh.svg
│ │ │ ├── bi.svg
│ │ │ ├── bj.svg
│ │ │ ├── bl.svg
│ │ │ ├── bm.svg
│ │ │ ├── bn.svg
│ │ │ ├── bo.svg
│ │ │ ├── bq.svg
│ │ │ ├── br.svg
│ │ │ ├── bs.svg
│ │ │ ├── bt.svg
│ │ │ ├── bv.svg
│ │ │ ├── bw.svg
│ │ │ ├── by.svg
│ │ │ ├── bz.svg
│ │ │ ├── ca.svg
│ │ │ ├── cc.svg
│ │ │ ├── cd.svg
│ │ │ ├── cf.svg
│ │ │ ├── cg.svg
│ │ │ ├── ch.svg
│ │ │ ├── ci.svg
│ │ │ ├── ck.svg
│ │ │ ├── cl.svg
│ │ │ ├── cm.svg
│ │ │ ├── cn.svg
│ │ │ ├── co.svg
│ │ │ ├── cr.svg
│ │ │ ├── cu.svg
│ │ │ ├── cv.svg
│ │ │ ├── cw.svg
│ │ │ ├── cx.svg
│ │ │ ├── cy.svg
│ │ │ ├── cz.svg
│ │ │ ├── de.svg
│ │ │ ├── dj.svg
│ │ │ ├── dk.svg
│ │ │ ├── dm.svg
│ │ │ ├── do.svg
│ │ │ ├── dz.svg
│ │ │ ├── ec.svg
│ │ │ ├── ee.svg
│ │ │ ├── eg.svg
│ │ │ ├── eh.svg
│ │ │ ├── er.svg
│ │ │ ├── es.svg
│ │ │ ├── et.svg
│ │ │ ├── eu.svg
│ │ │ ├── fi.svg
│ │ │ ├── fj.svg
│ │ │ ├── fk.svg
│ │ │ ├── fm.svg
│ │ │ ├── fo.svg
│ │ │ ├── fr.svg
│ │ │ ├── ga.svg
│ │ │ ├── gb-eng.svg
│ │ │ ├── gb-nir.svg
│ │ │ ├── gb-sct.svg
│ │ │ ├── gb-wls.svg
│ │ │ ├── gb.svg
│ │ │ ├── gd.svg
│ │ │ ├── ge.svg
│ │ │ ├── gf.svg
│ │ │ ├── gg.svg
│ │ │ ├── gh.svg
│ │ │ ├── gi.svg
│ │ │ ├── gl.svg
│ │ │ ├── gm.svg
│ │ │ ├── gn.svg
│ │ │ ├── gp.svg
│ │ │ ├── gq.svg
│ │ │ ├── gr.svg
│ │ │ ├── gs.svg
│ │ │ ├── gt.svg
│ │ │ ├── gu.svg
│ │ │ ├── gw.svg
│ │ │ ├── gy.svg
│ │ │ ├── hk.svg
│ │ │ ├── hm.svg
│ │ │ ├── hn.svg
│ │ │ ├── hr.svg
│ │ │ ├── ht.svg
│ │ │ ├── hu.svg
│ │ │ ├── id.svg
│ │ │ ├── ie.svg
│ │ │ ├── il.svg
│ │ │ ├── im.svg
│ │ │ ├── in.svg
│ │ │ ├── io.svg
│ │ │ ├── iq.svg
│ │ │ ├── ir.svg
│ │ │ ├── is.svg
│ │ │ ├── it.svg
│ │ │ ├── je.svg
│ │ │ ├── jm.svg
│ │ │ ├── jo.svg
│ │ │ ├── jp.svg
│ │ │ ├── ke.svg
│ │ │ ├── kg.svg
│ │ │ ├── kh.svg
│ │ │ ├── ki.svg
│ │ │ ├── km.svg
│ │ │ ├── kn.svg
│ │ │ ├── kp.svg
│ │ │ ├── kr.svg
│ │ │ ├── kw.svg
│ │ │ ├── ky.svg
│ │ │ ├── kz.svg
│ │ │ ├── la.svg
│ │ │ ├── lb.svg
│ │ │ ├── lc.svg
│ │ │ ├── li.svg
│ │ │ ├── lk.svg
│ │ │ ├── lr.svg
│ │ │ ├── ls.svg
│ │ │ ├── lt.svg
│ │ │ ├── lu.svg
│ │ │ ├── lv.svg
│ │ │ ├── ly.svg
│ │ │ ├── ma.svg
│ │ │ ├── mc.svg
│ │ │ ├── md.svg
│ │ │ ├── me.svg
│ │ │ ├── mf.svg
│ │ │ ├── mg.svg
│ │ │ ├── mh.svg
│ │ │ ├── mk.svg
│ │ │ ├── ml.svg
│ │ │ ├── mm.svg
│ │ │ ├── mn.svg
│ │ │ ├── mo.svg
│ │ │ ├── mp.svg
│ │ │ ├── mq.svg
│ │ │ ├── mr.svg
│ │ │ ├── ms.svg
│ │ │ ├── mt.svg
│ │ │ ├── mu.svg
│ │ │ ├── mv.svg
│ │ │ ├── mw.svg
│ │ │ ├── mx.svg
│ │ │ ├── my.svg
│ │ │ ├── mz.svg
│ │ │ ├── na.svg
│ │ │ ├── nc.svg
│ │ │ ├── ne.svg
│ │ │ ├── nf.svg
│ │ │ ├── ng.svg
│ │ │ ├── ni.svg
│ │ │ ├── nl.svg
│ │ │ ├── no.svg
│ │ │ ├── np.svg
│ │ │ ├── nr.svg
│ │ │ ├── nu.svg
│ │ │ ├── nz.svg
│ │ │ ├── om.svg
│ │ │ ├── pa.svg
│ │ │ ├── pe.svg
│ │ │ ├── pf.svg
│ │ │ ├── pg.svg
│ │ │ ├── ph.svg
│ │ │ ├── pk.svg
│ │ │ ├── pl.svg
│ │ │ ├── pm.svg
│ │ │ ├── pn.svg
│ │ │ ├── pr.svg
│ │ │ ├── ps.svg
│ │ │ ├── pt.svg
│ │ │ ├── pw.svg
│ │ │ ├── py.svg
│ │ │ ├── qa.svg
│ │ │ ├── re.svg
│ │ │ ├── ro.svg
│ │ │ ├── rs.svg
│ │ │ ├── ru.svg
│ │ │ ├── rw.svg
│ │ │ ├── sa.svg
│ │ │ ├── sb.svg
│ │ │ ├── sc.svg
│ │ │ ├── sd.svg
│ │ │ ├── se.svg
│ │ │ ├── sg.svg
│ │ │ ├── sh.svg
│ │ │ ├── si.svg
│ │ │ ├── sj.svg
│ │ │ ├── sk.svg
│ │ │ ├── sl.svg
│ │ │ ├── sm.svg
│ │ │ ├── sn.svg
│ │ │ ├── so.svg
│ │ │ ├── sr.svg
│ │ │ ├── ss.svg
│ │ │ ├── st.svg
│ │ │ ├── sv.svg
│ │ │ ├── sx.svg
│ │ │ ├── sy.svg
│ │ │ ├── sz.svg
│ │ │ ├── tc.svg
│ │ │ ├── td.svg
│ │ │ ├── tf.svg
│ │ │ ├── tg.svg
│ │ │ ├── th.svg
│ │ │ ├── tj.svg
│ │ │ ├── tk.svg
│ │ │ ├── tl.svg
│ │ │ ├── tm.svg
│ │ │ ├── tn.svg
│ │ │ ├── to.svg
│ │ │ ├── tr.svg
│ │ │ ├── tt.svg
│ │ │ ├── tv.svg
│ │ │ ├── tw.svg
│ │ │ ├── tz.svg
│ │ │ ├── ua.svg
│ │ │ ├── ug.svg
│ │ │ ├── um.svg
│ │ │ ├── un.svg
│ │ │ ├── us.svg
│ │ │ ├── uy.svg
│ │ │ ├── uz.svg
│ │ │ ├── va.svg
│ │ │ ├── vc.svg
│ │ │ ├── ve.svg
│ │ │ ├── vg.svg
│ │ │ ├── vi.svg
│ │ │ ├── vn.svg
│ │ │ ├── vu.svg
│ │ │ ├── wf.svg
│ │ │ ├── ws.svg
│ │ │ ├── ye.svg
│ │ │ ├── yt.svg
│ │ │ ├── za.svg
│ │ │ ├── zm.svg
│ │ │ └── zw.svg
│ │ ├── larametrics-logo.svg
│ │ └── payments
│ │ │ ├── 2checkout-dark.svg
│ │ │ ├── 2checkout.svg
│ │ │ ├── alipay-dark.svg
│ │ │ ├── alipay.svg
│ │ │ ├── amazon-dark.svg
│ │ │ ├── amazon.svg
│ │ │ ├── americanexpress-dark.svg
│ │ │ ├── americanexpress.svg
│ │ │ ├── applepay-dark.svg
│ │ │ ├── applepay.svg
│ │ │ ├── bancontact-dark.svg
│ │ │ ├── bancontact.svg
│ │ │ ├── bitcoin-dark.svg
│ │ │ ├── bitcoin.svg
│ │ │ ├── bitpay-dark.svg
│ │ │ ├── bitpay.svg
│ │ │ ├── cirrus-dark.svg
│ │ │ ├── cirrus.svg
│ │ │ ├── clickandbuy-dark.svg
│ │ │ ├── clickandbuy.svg
│ │ │ ├── coinkite-dark.svg
│ │ │ ├── coinkite.svg
│ │ │ ├── dinersclub-dark.svg
│ │ │ ├── dinersclub.svg
│ │ │ ├── directdebit-dark.svg
│ │ │ ├── directdebit.svg
│ │ │ ├── discover-dark.svg
│ │ │ ├── discover.svg
│ │ │ ├── dwolla-dark.svg
│ │ │ ├── dwolla.svg
│ │ │ ├── ebay-dark.svg
│ │ │ ├── ebay.svg
│ │ │ ├── eway-dark.svg
│ │ │ ├── eway.svg
│ │ │ ├── giropay-dark.svg
│ │ │ ├── giropay.svg
│ │ │ ├── googlewallet-dark.svg
│ │ │ ├── googlewallet.svg
│ │ │ ├── ingenico-dark.svg
│ │ │ ├── ingenico.svg
│ │ │ ├── jcb-dark.svg
│ │ │ ├── jcb.svg
│ │ │ ├── klarna-dark.svg
│ │ │ ├── klarna.svg
│ │ │ ├── laser-dark.svg
│ │ │ ├── laser.svg
│ │ │ ├── maestro-dark.svg
│ │ │ ├── maestro.svg
│ │ │ ├── mastercard-dark.svg
│ │ │ ├── mastercard.svg
│ │ │ ├── monero-dark.svg
│ │ │ ├── monero.svg
│ │ │ ├── neteller-dark.svg
│ │ │ ├── neteller.svg
│ │ │ ├── ogone-dark.svg
│ │ │ ├── ogone.svg
│ │ │ ├── okpay-dark.svg
│ │ │ ├── okpay.svg
│ │ │ ├── paybox-dark.svg
│ │ │ ├── paybox.svg
│ │ │ ├── paymill-dark.svg
│ │ │ ├── paymill.svg
│ │ │ ├── payone-dark.svg
│ │ │ ├── payone.svg
│ │ │ ├── payoneer-dark.svg
│ │ │ ├── payoneer.svg
│ │ │ ├── paypal-dark.svg
│ │ │ ├── paypal.svg
│ │ │ ├── paysafecard-dark.svg
│ │ │ ├── paysafecard.svg
│ │ │ ├── payu-dark.svg
│ │ │ ├── payu.svg
│ │ │ ├── payza-dark.svg
│ │ │ ├── payza.svg
│ │ │ ├── ripple-dark.svg
│ │ │ ├── ripple.svg
│ │ │ ├── sage-dark.svg
│ │ │ ├── sage.svg
│ │ │ ├── sepa-dark.svg
│ │ │ ├── sepa.svg
│ │ │ ├── shopify-dark.svg
│ │ │ ├── shopify.svg
│ │ │ ├── skrill-dark.svg
│ │ │ ├── skrill.svg
│ │ │ ├── solo-dark.svg
│ │ │ ├── solo.svg
│ │ │ ├── square-dark.svg
│ │ │ ├── square.svg
│ │ │ ├── stripe-dark.svg
│ │ │ ├── stripe.svg
│ │ │ ├── switch-dark.svg
│ │ │ ├── switch.svg
│ │ │ ├── ukash-dark.svg
│ │ │ ├── ukash.svg
│ │ │ ├── unionpay-dark.svg
│ │ │ ├── unionpay.svg
│ │ │ ├── verifone-dark.svg
│ │ │ ├── verifone.svg
│ │ │ ├── verisign-dark.svg
│ │ │ ├── verisign.svg
│ │ │ ├── visa-dark.svg
│ │ │ ├── visa.svg
│ │ │ ├── webmoney-dark.svg
│ │ │ ├── webmoney.svg
│ │ │ ├── westernunion-dark.svg
│ │ │ ├── westernunion.svg
│ │ │ ├── worldpay-dark.svg
│ │ │ └── worldpay.svg
│ ├── js
│ │ ├── core.js
│ │ ├── dashboard.js
│ │ ├── require.min.js
│ │ ├── vendors
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── chart.bundle.min.js
│ │ │ ├── circle-progress.min.js
│ │ │ ├── jquery-3.2.1.min.js
│ │ │ ├── jquery-3.2.1.slim.min.js
│ │ │ ├── jquery-jvectormap-2.0.3.min.js
│ │ │ ├── jquery-jvectormap-de-merc.js
│ │ │ ├── jquery-jvectormap-world-mill.js
│ │ │ ├── jquery.sparkline.min.js
│ │ │ ├── jquery.tablesorter.min.js
│ │ │ └── selectize.min.js
│ │ ├── vue.js
│ │ └── vue.min.js
│ └── plugins
│ │ ├── charts-c3
│ │ ├── js
│ │ │ ├── c3.min.js
│ │ │ └── d3.v3.min.js
│ │ ├── plugin.css
│ │ └── plugin.js
│ │ ├── fullcalendar
│ │ ├── js
│ │ │ ├── fullcalendar.min.js
│ │ │ └── moment.min.js
│ │ ├── plugin.css
│ │ └── plugin.js
│ │ ├── iconfonts
│ │ ├── fonts
│ │ │ ├── materialdesignicons
│ │ │ │ ├── materialdesignicons-webfont.eot
│ │ │ │ ├── materialdesignicons-webfont.svg
│ │ │ │ ├── materialdesignicons-webfont.ttf
│ │ │ │ ├── materialdesignicons-webfont.woff
│ │ │ │ └── materialdesignicons-webfont.woff2
│ │ │ ├── simple-line-icons
│ │ │ │ ├── Simple-Line-Icons.eot
│ │ │ │ ├── Simple-Line-Icons.svg
│ │ │ │ ├── Simple-Line-Icons.ttf
│ │ │ │ ├── Simple-Line-Icons.woff
│ │ │ │ └── Simple-Line-Icons.woff2
│ │ │ ├── themify
│ │ │ │ ├── themify.eot
│ │ │ │ ├── themify.svg
│ │ │ │ ├── themify.ttf
│ │ │ │ └── themify.woff
│ │ │ └── weathericons
│ │ │ │ ├── weathericons-regular-webfont.eot
│ │ │ │ ├── weathericons-regular-webfont.svg
│ │ │ │ ├── weathericons-regular-webfont.ttf
│ │ │ │ ├── weathericons-regular-webfont.woff
│ │ │ │ └── weathericons-regular-webfont.woff2
│ │ └── plugin.css
│ │ ├── input-mask
│ │ ├── js
│ │ │ └── jquery.mask.min.js
│ │ └── plugin.js
│ │ ├── maps-google
│ │ ├── plugin.css
│ │ └── plugin.js
│ │ └── prismjs
│ │ ├── js
│ │ └── prism.pack.js
│ │ ├── plugin.css
│ │ └── plugin.js
└── views
│ ├── common
│ ├── default.blade.php
│ └── partials
│ │ ├── footer.blade.php
│ │ ├── head.blade.php
│ │ └── header.blade.php
│ ├── emails
│ ├── log-written.blade.php
│ ├── model-changed.blade.php
│ └── route-requested.blade.php
│ ├── logs
│ ├── index.blade.php
│ └── show.blade.php
│ ├── metrics
│ └── index.blade.php
│ ├── models
│ ├── index.blade.php
│ ├── model.blade.php
│ └── show.blade.php
│ ├── notifications
│ └── index.blade.php
│ ├── performance
│ └── index.blade.php
│ └── requests
│ ├── index.blade.php
│ └── show.blade.php
├── routes
└── web.php
└── src
├── Actions
├── SaveLog.php
├── SaveQuery.php
└── SaveRoute.php
├── Http
├── Channels
│ └── WebhookChannel.php
└── Controllers
│ ├── LogController.php
│ ├── MetricsController.php
│ ├── ModelController.php
│ ├── NotificationController.php
│ ├── PerformanceController.php
│ ├── RequestController.php
│ └── RouteController.php
├── Larametrics.php
├── LarametricsEventsServiceProvider.php
├── LarametricsServiceProvider.php
├── Listeners
├── LogListener.php
└── RouteListener.php
├── LogParser.php
├── Observers
└── ModelObserver.php
├── helpers.php
├── models
├── LarametricsLog.php
├── LarametricsModel.php
├── LarametricsNotification.php
└── LarametricsRequest.php
└── notifications
├── LogWritten.php
├── ModelChanged.php
└── RouteRequested.php
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: aschmelyun
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | composer.lock
3 | vendor
4 | .phpunit.result.cache
5 | .DS_Store
6 | .idea
7 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 7.0
5 | - 7.1
6 | - 7.2
7 | - 7.3
8 |
9 | env:
10 | matrix:
11 | - COMPOSER_FLAGS="--prefer-lowest"
12 | - COMPOSER_FLAGS=""
13 |
14 | before_script:
15 | - travis_retry composer self-update
16 | - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
17 |
18 | script:
19 | - vendor/bin/phpunit
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Andrew Schmelyun
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "aschmelyun/larametrics",
3 | "description": "A self-hosted metrics and notifications platform for Laravel apps",
4 | "license": "MIT",
5 | "authors": [
6 | {
7 | "name": "Andrew Schmelyun",
8 | "email": "me@aschmelyun.com",
9 | "homepage": "https://aschmelyun.com",
10 | "role": "Developer"
11 | }
12 | ],
13 | "require": {
14 | "php": "^7.0",
15 | "guzzlehttp/guzzle": "^6.5"
16 | },
17 | "require-dev": {
18 | "orchestra/testbench": "~3.4.0|~3.6.0|~3.7.0|~3.8.0|^4.0",
19 | "phpunit/phpunit": "^6.0|^7.0|^8.0"
20 | },
21 | "autoload": {
22 | "psr-4": {
23 | "Aschmelyun\\Larametrics\\": "src"
24 | }
25 | },
26 | "autoload-dev": {
27 | "psr-4": {
28 | "Aschmelyun\\Larametrics\\Tests\\": "tests"
29 | }
30 | },
31 | "scripts": {
32 | "test": "vendor/bin/phpunit"
33 | },
34 | "extra": {
35 | "laravel": {
36 | "providers": [
37 | "Aschmelyun\\Larametrics\\LarametricsServiceProvider"
38 | ]
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/database/migrations/2018_06_01_000000_create_larametrics_models_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('model');
19 | $table->integer('model_id');
20 | $table->string('method');
21 | $table->text('original')->nullable();
22 | $table->text('changes')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('larametrics_models');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2018_07_01_000000_create_larametrics_requests_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('method');
19 | $table->text('uri');
20 | $table->string('ip')->nullable();
21 | $table->text('headers')->nullable();
22 | $table->float('start_time', 16, 4)->nullable();
23 | $table->float('end_time', 16, 4)->nullable();
24 | $table->timestamps();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down()
34 | {
35 | Schema::dropIfExists('larametrics_requests');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2018_07_28_000000_create_larametrics_logs_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('level');
19 | $table->text('message');
20 | $table->integer('user_id')->nullable();
21 | $table->string('email')->nullable();
22 | $table->text('trace');
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('larametrics_logs');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2018_08_02_000000_create_larametrics_notifications_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('action');
19 | $table->string('filter')->nullable();
20 | $table->text('meta')->nullable();
21 | $table->string('notify_by')->default('email');
22 | $table->timestamp('last_fired_at')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('larametrics_notifications');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2020_01_09_000000_add_user_id_column_to_larametrics_models_table.php:
--------------------------------------------------------------------------------
1 | integer('user_id')
18 | ->after('model_id')
19 | ->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::table('larametrics_models', function ($table) {
31 | $table->dropColumn('user_id');
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | tests
15 |
16 |
17 |
18 |
19 | src/
20 |
21 |
22 |
--------------------------------------------------------------------------------
/resources/assets/fonts/feather/feather-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/fonts/feather/feather-webfont.eot
--------------------------------------------------------------------------------
/resources/assets/fonts/feather/feather-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/fonts/feather/feather-webfont.ttf
--------------------------------------------------------------------------------
/resources/assets/fonts/feather/feather-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/fonts/feather/feather-webfont.woff
--------------------------------------------------------------------------------
/resources/assets/images/browsers/aol-explorer.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/blackberry.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/edge.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/ie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/maxthon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/netscape.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/opera.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/uc-browser.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/browsers/vivaldi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/bitcoin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/dash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/eos.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/ethereum.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/litecoin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/crypto-currencies/ripple.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ae.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/am.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ao.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/at.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/au.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ax.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/az.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ba.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/be.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bq.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bs.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/bw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ca.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ci.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ck.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/co.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/cz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/de.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/dj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/dk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/dz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ee.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/eh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/et.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/eu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/fi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/fm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/fo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/fr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ga.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gb-eng.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gb-sct.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ge.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/gy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/hm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/hn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/hu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/id.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/il.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/in.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/iq.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/is.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/it.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/jm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/jo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/jp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ke.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/km.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/kn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/kp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/kr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/kw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/la.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/lc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/lr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ls.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/lt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/lu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/lv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ly.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ma.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ml.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mq.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/mv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/my.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/na.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/nc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ne.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ng.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/nl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/no.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/np.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/nr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/nu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ph.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ps.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/pw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/qa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/re.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ro.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ru.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/rw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/se.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/si.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/so.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ss.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/st.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/sy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/td.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/th.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/to.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/tz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ua.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/uy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/uz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/vc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ve.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/vn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/wf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ws.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/ye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/yt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/flags/za.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/payments/2checkout-dark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/payments/2checkout.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/payments/neteller-dark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/images/payments/neteller.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/assets/plugins/charts-c3/plugin.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | shim: {
3 | 'c3': ['d3', 'core'],
4 | 'd3': ['core'],
5 | },
6 | paths: {
7 | 'd3': 'assets/plugins/charts-c3/js/d3.v3.min',
8 | 'c3': 'assets/plugins/charts-c3/js/c3.min',
9 | }
10 | });
--------------------------------------------------------------------------------
/resources/assets/plugins/fullcalendar/plugin.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | shim: {
3 | 'fullcalendar': ['moment', 'jquery'],
4 | },
5 | paths: {
6 | 'fullcalendar': 'assets/plugins/fullcalendar/js/fullcalendar.min',
7 | 'moment': 'assets/plugins/fullcalendar/js/moment.min',
8 | }
9 | });
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.eot
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.ttf
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.woff
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/materialdesignicons/materialdesignicons-webfont.woff2
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.eot
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.ttf
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.woff
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/simple-line-icons/Simple-Line-Icons.woff2
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/themify/themify.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/themify/themify.eot
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/themify/themify.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/themify/themify.ttf
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/themify/themify.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/themify/themify.woff
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.eot
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.ttf
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.woff
--------------------------------------------------------------------------------
/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/iconfonts/fonts/weathericons/weathericons-regular-webfont.woff2
--------------------------------------------------------------------------------
/resources/assets/plugins/input-mask/plugin.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | shim: {
3 | 'input-mask': ['jquery', 'core']
4 | },
5 | paths: {
6 | 'input-mask': 'assets/plugins/input-mask/js/jquery.mask.min'
7 | }
8 | });
--------------------------------------------------------------------------------
/resources/assets/plugins/maps-google/plugin.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/maps-google/plugin.css
--------------------------------------------------------------------------------
/resources/assets/plugins/maps-google/plugin.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aschmelyun/larametrics/9e2cdb53d2c0693b5e7656e95c51baec2ef45dad/resources/assets/plugins/maps-google/plugin.js
--------------------------------------------------------------------------------
/resources/assets/plugins/prismjs/plugin.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | paths: {
3 | 'prismjs': 'assets/plugins/prismjs/js/prism.pack',
4 | },
5 | shim: {
6 | prism: {
7 | exports: "Prism"
8 | }
9 | }
10 | });
11 |
12 | require(['prismjs', 'jquery'], function(prismjs, $){
13 | $(document).ready(function(){
14 | // $('[class^="language-"]').each(function(i, block) {
15 | // Prism.highlightElement(block);
16 | // });
17 | });
18 | });
--------------------------------------------------------------------------------
/resources/views/common/default.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | @include('larametrics::common.partials.head')
6 |
7 |
8 |
9 |
10 |
11 | @include('larametrics::common.partials.header')
12 |
13 |
14 |
20 | @yield('content')
21 |
22 |
23 |
24 | @include('larametrics::common.partials.footer')
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/resources/views/common/partials/footer.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/views/common/partials/head.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ $pageTitle ?: 'Welcome' }} - Larametrics
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/resources/views/logs/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('larametrics::common.default')
2 | @section('content')
3 |
4 |
5 |
6 |
{{ $log->message }}
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 | No. |
19 | Info |
20 |
21 |
22 |
23 | @foreach(json_decode($log->trace) as $index => $trace)
24 |
25 | #{{ $index }} |
26 | @if(isset($trace->class) && isset($trace->function))
27 | {{ $trace->class }}@{{ $trace->function }} |
28 | @else
29 | @if(isset($trace->file))
30 | {{ $trace->file }}:{{ $trace->line }} |
31 | @endif
32 | @endif
33 |
34 | @endforeach
35 |
36 |
37 |
38 |
39 |
40 |
41 | @endsection
--------------------------------------------------------------------------------
/resources/views/models/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('larametrics::common.default')
2 | @section('content')
3 |
4 | @foreach($modelsAmounts as $model => $info)
5 |
6 |
7 |
8 |
9 | {{ $info['count'] }}
10 |
11 |
12 |
15 |
{{ $info['changes'] }} change{{ $info['changes'] !== 1 ? 's' : '' }} in {{ $watchLength }} day{{ $watchLength !== 1 ? 's' : '' }}
16 |
17 |
18 |
19 |
20 | @endforeach
21 |
22 | @endsection
--------------------------------------------------------------------------------
/resources/views/requests/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('larametrics::common.default')
2 | @section('content')
3 | @php $headers = json_decode($request->headers, true); @endphp
4 |
5 |
6 |
7 |
{{ $request->headers }}
8 |
9 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 | Field |
20 | Value |
21 |
22 |
23 |
24 |
25 | Method |
26 | {{ $request->method }} |
27 |
28 |
29 | URI |
30 | {{ $request->uri }} |
31 |
32 |
33 | IP Address |
34 | {{ $request->ip }} |
35 |
36 |
37 | Execution Time |
38 | {{ floor(($request->end_time - $request->start_time) * 1000) }}ms |
39 |
40 |
41 | Host |
42 | {{ $headers['host'][0] }} |
43 |
44 |
45 | User Agent |
46 | {{ $headers['user-agent'][0] }} |
47 |
48 |
49 | Referer |
50 | {{ isset($headers['referer']) ? $headers['referer'][0] : '-' }} |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | @endsection
59 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | 'larametrics::'], function () {
4 |
5 | // dashboard routes
6 | Route::get('/metrics', [
7 | 'as' => 'metrics.index',
8 | 'uses' => larametricsUses('MetricsController@index'),
9 | ]);
10 |
11 | // logs routes
12 | Route::get('/metrics/logs', [
13 | 'as' => 'logs.index',
14 | 'uses' => larametricsUses('LogController@index'),
15 | ]);
16 |
17 | Route::get('/metrics/logs/{log}', [
18 | 'as' => 'logs.show',
19 | 'uses' => larametricsUses('LogController@show'),
20 | ]);
21 |
22 | // models routes
23 | Route::get('/metrics/models', [
24 | 'as' => 'models.index',
25 | 'uses' => larametricsUses('ModelController@index'),
26 | ]);
27 |
28 | Route::get('/metrics/models/{model}', [
29 | 'as' => 'models.show',
30 | 'uses' => larametricsUses('ModelController@show'),
31 | ]);
32 |
33 | Route::get('/metrics/models/{model}/revert', [
34 | 'as' => 'models.revert',
35 | 'uses' => larametricsUses('ModelController@revert'),
36 | ]);
37 |
38 | // performance routes
39 | Route::get('/metrics/performance', [
40 | 'as' => 'performance.index',
41 | 'uses' => larametricsUses('PerformanceController@index'),
42 | ]);
43 |
44 | // request routes
45 | Route::get('/metrics/requests', [
46 | 'as' => 'requests.index',
47 | 'uses' => larametricsUses('RequestController@index'),
48 | ]);
49 |
50 | Route::get('/metrics/requests/{request}', [
51 | 'as' => 'requests.show',
52 | 'uses' => larametricsUses('RequestController@show'),
53 | ]);
54 |
55 | // notifications routes
56 | Route::get('/metrics/notifications', [
57 | 'as' => 'notifications.index',
58 | 'uses' => larametricsUses('NotificationController@index'),
59 | ]);
60 |
61 | Route::post('/metrics/notifications/edit', [
62 | 'as' => 'notifications.update',
63 | 'uses' => larametricsUses('NotificationController@update'),
64 | ]);
65 |
66 | if(config('larametrics.requestsWatched')) {
67 |
68 | Route::any('/{any}', [
69 | 'as' => 'routes.catch',
70 | 'uses' => larametricsUses('RouteController@catch')
71 | ])->where('any', '.*');
72 |
73 | }
74 |
75 | });
76 |
--------------------------------------------------------------------------------
/src/Http/Channels/WebhookChannel.php:
--------------------------------------------------------------------------------
1 | toWebhook($notifiable);
14 |
15 | $client = new Client();
16 | try {
17 | $request = $client->post(config('larametrics.notificationMethods')['webhook'], [
18 | 'json' => $message
19 | ]);
20 |
21 | dd($request);
22 | } catch(\Exception $e) {
23 | //fail silently
24 | }
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/src/Http/Controllers/LogController.php:
--------------------------------------------------------------------------------
1 | get();
16 |
17 | return view('larametrics::logs.index', [
18 | 'logs' => $logs,
19 | 'pageTitle' => 'Laravel Logs'
20 | ]);
21 | }
22 |
23 | public function show(LarametricsLog $log)
24 | {
25 | return view('larametrics::logs.show', [
26 | 'log' => $log,
27 | 'pageTitle' => 'Viewing Log Details'
28 | ]);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Controllers/MetricsController.php:
--------------------------------------------------------------------------------
1 | limit(10)
19 | ->get();
20 |
21 | $logs = LarametricsLog::orderBy('created_at', 'desc')
22 | ->limit(10)
23 | ->get();
24 |
25 | $models = LarametricsModel::orderBy('created_at', 'desc')
26 | ->limit(10)
27 | ->get();
28 |
29 | return view('larametrics::metrics.index', [
30 | 'pageTitle' => 'Dashboard',
31 | 'requests' => $requests,
32 | 'logs' => $logs,
33 | 'models' => $models
34 | ]);
35 | }
36 |
37 | public function logs()
38 | {
39 | return view('larametrics::logs.index');
40 | }
41 |
42 | public function logShow($index)
43 | {
44 | $logArray = LogParser::all();
45 |
46 | if(!isset($logArray[$index])) {
47 | return abort(404);
48 | }
49 |
50 | return view('larametrics::logs.show', [
51 | 'log' => $logArray[$index],
52 | 'pageTitle' => 'Viewing Log'
53 | ]);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/Http/Controllers/NotificationController.php:
--------------------------------------------------------------------------------
1 | $notifications,
18 | 'pageTitle' => 'Notifications'
19 | ]);
20 | }
21 |
22 | public function update(Request $request)
23 | {
24 | $notifications = '';
25 | LarametricsNotification::truncate();
26 | foreach(json_decode($request->input('notifications')) as $notification) {
27 | $notificationData = array(
28 | 'action' => $notification->action,
29 | 'filter' => $notification->filter,
30 | 'notify_by' => $notification->notify_by
31 | );
32 | try {
33 | LarametricsNotification::create($notificationData);
34 | } catch(\Exception $e) {}
35 | }
36 |
37 | return redirect()->route('larametrics::notifications.index');
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/Http/Controllers/PerformanceController.php:
--------------------------------------------------------------------------------
1 | limit(200)
17 | ->get();
18 |
19 | $requests = LarametricsRequest::all()
20 | ->toArray();
21 | foreach($requests as $index => $request) {
22 | $responseTime = floor(($request['end_time'] - $request['start_time']) * 1000);
23 | $requests[$index]['responseTime'] = $responseTime;
24 | }
25 |
26 | usort($requests, function($a, $b) {
27 | return $b['responseTime'] - $a['responseTime'];
28 | });
29 |
30 | return view('larametrics::performance.index', [
31 | 'latestRequests' => $latestRequests,
32 | 'requestsByResponseTime' => array_slice($requests, 0, 10),
33 | 'pageTitle' => 'App Performance'
34 | ]);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/Http/Controllers/RequestController.php:
--------------------------------------------------------------------------------
1 | get();
16 |
17 | return view('larametrics::requests.index', [
18 | 'requests' => $requests,
19 | 'pageTitle' => 'Laravel Requests'
20 | ]);
21 | }
22 |
23 | public function show(LarametricsRequest $request)
24 | {
25 | return view('larametrics::requests.show', [
26 | 'request' => $request,
27 | 'pageTitle' => 'Viewing Request #' . $request->id
28 | ]);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Controllers/RouteController.php:
--------------------------------------------------------------------------------
1 | dispatch();
17 |
18 | \Log::alert('A 404 error was triggered as a user was attempting to visit ' . env('APP_URL', '') . $request->getRequestUri());
19 |
20 | abort(404);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/Larametrics.php:
--------------------------------------------------------------------------------
1 | [
17 | LogListener::class
18 | ],
19 | RouteMatched::class => [
20 | RouteListener::class
21 | ]
22 | ];
23 |
24 | public function boot()
25 | {
26 | parent::boot();
27 |
28 | if(!config('larametrics')) {
29 | return;
30 | }
31 |
32 | foreach(config('larametrics.modelsWatched') as $model) {
33 | try {
34 | $model::observe(new ModelObserver());
35 | } catch(\Exception $e) {}
36 | }
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/src/LarametricsServiceProvider.php:
--------------------------------------------------------------------------------
1 | loadMigrationsFrom(__DIR__ . '/../database/migrations');
14 | } else {
15 | $this->publishes([
16 | __DIR__ . '/../database/migrations/' => database_path('migrations'),
17 | ], 'migrations');
18 | }
19 |
20 | $this->publishes([
21 | __DIR__ . '/../config/larametrics.php' => config_path('larametrics.php'),
22 | ]);
23 |
24 | $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larametrics');
25 |
26 | $this->publishes([
27 | __DIR__ . '/../resources/assets' => public_path('vendor/larametrics'),
28 | ], 'public');
29 | }
30 |
31 | public function register()
32 | {
33 | require_once __DIR__ . '/helpers.php';
34 |
35 | $this->app->singleton(Larametrics::class, function () {
36 | return new Larametrics();
37 | });
38 |
39 | $this->app->register('Aschmelyun\Larametrics\LarametricsEventsServiceProvider');
40 |
41 | $this->app->alias(Larametrics::class, 'larametrics');
42 | }
43 |
44 | public function provides()
45 | {
46 |
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/src/Listeners/LogListener.php:
--------------------------------------------------------------------------------
1 | request);
14 | $saveLog->dispatch();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/Listeners/RouteListener.php:
--------------------------------------------------------------------------------
1 | request, $route);
14 | $saveRoute->dispatch();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/Observers/ModelObserver.php:
--------------------------------------------------------------------------------
1 | dispatchSaveQuery($model);
13 | }
14 |
15 | public function updated($model)
16 | {
17 | $this->dispatchSaveQuery($model);
18 | }
19 |
20 | public function deleted($model)
21 | {
22 | $this->dispatchSaveQuery($model);
23 | }
24 |
25 | public function dispatchSaveQuery($model)
26 | {
27 | $saveQuery = new SaveQuery($model, app()->request);
28 | $saveQuery->dispatch();
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/src/helpers.php:
--------------------------------------------------------------------------------
1 | [
20 | 'emergency',
21 | 'alert',
22 | 'critical',
23 | 'error'
24 | ],
25 | 'notice' => [
26 | 'warning',
27 | 'notice'
28 | ],
29 | 'debug' => [
30 | 'info',
31 | 'debug'
32 | ]
33 | );
34 |
35 | foreach($notificationLevels as $triggerLevel => $childLevels) {
36 | if(in_array($this->level, $childLevels)) {
37 | $logLevel = $triggerLevel;
38 | }
39 | }
40 |
41 | return $logLevel;
42 | }
43 | }
--------------------------------------------------------------------------------
/src/models/LarametricsModel.php:
--------------------------------------------------------------------------------
1 |