Completed
Push — master ( 4e528e...b698b3 )
by ARCANEDEV
04:17
created

Model::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php namespace Arcanedev\LaravelMessenger\Bases;
2
3
use Arcanedev\LaravelMessenger\Traits\ConfigHelper;
4
use Arcanedev\Support\Bases\Model as BaseModel;
5
6
/**
7
 * Class     Model
8
 *
9
 * @package  Arcanedev\LaravelMessenger\Bases
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
abstract class Model extends BaseModel
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Traits
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    use ConfigHelper;
19
20
    /* ------------------------------------------------------------------------------------------------
21
     |  Constructor
22
     | ------------------------------------------------------------------------------------------------
23
     */
24
    /**
25
     * Create a new Eloquent model instance.
26
     *
27
     * @param  array  $attributes
28
     */
29
    public function __construct(array $attributes = [])
30
    {
31
        $this->setConnection(
32
            $this->getFromConfig('database.connection')
33
        );
34
35
        parent::__construct($attributes);
36
    }
37
}
38