Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| Domain | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 2 |
| serializeDate | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| brand | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Brand\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | |
| 7 | class Domain extends Model |
| 8 | { |
| 9 | protected $connection = 'brandMysql'; |
| 10 | protected $fillable = ['name', 'brand_id']; |
| 11 | |
| 12 | /** |
| 13 | * Prepare a date for array / JSON serialization. |
| 14 | * |
| 15 | * @param \DateTimeInterface $date |
| 16 | * @return string |
| 17 | */ |
| 18 | protected function serializeDate(\DateTimeInterface $date) |
| 19 | { |
| 20 | return $date->format('Y-m-d H:i:s'); |
| 21 | } |
| 22 | |
| 23 | public function brand() |
| 24 | { |
| 25 | return $this->belongsTo('Qmp\Laravel\Brand\Models\Brand'); |
| 26 | } |
| 27 | } |