Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| Team | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 2 |
| userTeams | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| shift | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App\Models\Admin; | |
| use Illuminate\Database\Eloquent\Model; | |
| use OwenIt\Auditing\Contracts\Auditable; | |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| class Team extends Model implements Auditable | |
| { | |
| use \OwenIt\Auditing\Auditable; | |
| use SoftDeletes; | |
| protected $dates = ['deleted_at']; | |
| protected $fillable = ['team','has_schedule','has_holiday']; | |
| public function userTeams() | |
| { | |
| return $this->belongsToMany(UserDetail::class); | |
| } | |
| public function shift() | |
| { | |
| return $this->belongToMany(Shift::class,'team_shift','team_id','shift_id'); | |
| } | |
| } |