Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ctf0 committed Apr 9, 2018
1 parent 3f353c4 commit 0b3473c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/MediaManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ protected function packagePublish()
protected function extraConfigs()
{
// database
config(['database.connections.mediamanager' => [
'driver' => 'sqlite',
'database' => storage_path('logs/MediaManager.sqlite'),
]]);
$db = storage_path('logs/MediaManager.sqlite');

if ($this->file->exists($db)) {
config(['database.connections.mediamanager' => [
'driver' => 'sqlite',
'database' => $db,
]]);
}

// caching for zip-stream
config(['cache.stores.mediamanager' => [
Expand Down Expand Up @@ -148,6 +152,14 @@ protected function autoReg()
});
}

/**
* [checkExist description].
*
* @param [type] $file [description]
* @param [type] $search [description]
*
* @return [type] [description]
*/
protected function checkExist($file, $search)
{
return $this->file->exists($file) && !str_contains($this->file->get($file), $search);
Expand Down

0 comments on commit 0b3473c

Please sign in to comment.