Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Adds conditionals to check for published vendor file
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmelyun committed Jan 23, 2020
1 parent 8f04ea6 commit 580f836
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Actions/SaveLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public function dispatch()

public function checkExpiredLogs()
{
if(!config('larametrics')) {
return;
}

if(config('larametrics.logsWatchedExpireDays') !== 0) {
LarametricsLog::where('created_at', '<', Carbon::now()->subDays(config('larametrics.logsWatchedExpireDays'))->toDateTimeString())
->delete();
Expand Down
4 changes: 4 additions & 0 deletions src/LarametricsEventsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public function boot()
{
parent::boot();

if(!config('larametrics')) {
return;
}

foreach(config('larametrics.modelsWatched') as $model) {
try {
$model::observe(new ModelObserver());
Expand Down

0 comments on commit 580f836

Please sign in to comment.