danielme85 / laravel-log-to-db
Showing 2 of 6 files from the diff.

@@ -42,7 +42,7 @@
Loading
42 42
43 43
        //Publish the migration
44 44
        $this->publishes([
45 -
            __DIR__.'/../database/migrations/' => database_path('migrations')
45 +
            __DIR__.'/database/migrations/' => database_path('migrations')
46 46
        ], 'migrations');
47 47
48 48
        if ($this->app->runningInConsole()) {

@@ -45,7 +45,6 @@
Loading
45 45
     * LogToDB constructor.
46 46
     *
47 47
     * @param array $loggingConfig config values;.
48 -
     * @throws DBLogException
49 48
     */
50 49
    function __construct($loggingConfig = [])
51 50
    {
@@ -71,11 +70,6 @@
Loading
71 70
        if (isset($dbconfig[$this->connection])) {
72 71
            $this->database = $dbconfig[$this->connection];
73 72
        }
74 -
75 -
        if (empty($this->database)) {
76 -
            throw new DBLogException("Required configs missing: The LogToDB class needs a database correctly setup in the configs: databases.php and logtodb.php");
77 -
        }
78 -
79 73
    }
80 74
81 75
    /**
@@ -126,7 +120,7 @@
Loading
126 120
        //Use custom model
127 121
        if (!empty($this->model)) {
128 122
            return new $this->model;
129 -
        } else if ($this->database['driver'] === 'mongodb') {
123 +
        } else if (isset($this->database['driver']) && $this->database['driver'] === 'mongodb') {
130 124
            //MongoDB has its own Model
131 125
            $mongo = new DBLogMongoDB();
132 126
            $mongo->bind($this->connection, $this->collection);
Files Complexity Coverage
src 118 98.82%
Project Totals (11 files) 118 98.82%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading