Completed
Push — master ( d718a8...d55eed )
by ARCANEDEV
14:51
created

AbstractModel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php namespace Arcanedev\LaravelNotes\Models;
2
3
use Arcanedev\LaravelNotes\Traits\ConfigHelper;
4
use Arcanedev\Support\Bases\Model as BaseModel;
5
6
/**
7
 * Class     AbstractModel
8
 *
9
 * @package  Arcanedev\LaravelMessenger\Bases
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
abstract class AbstractModel 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