Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| UserShift | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 2 |
| user | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| shift | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App\Models\Auth; | |
| use Illuminate\Database\Eloquent\Model; | |
| use App\Models\Auth\User; | |
| use App\Models\Admin\Shift; | |
| class UserShift extends Model | |
| { | |
| protected $table = 'user_shifts'; | |
| /** | |
| * The attributes that are mass assignable. | |
| * | |
| * @var array | |
| */ | |
| protected $fillable = [ | |
| 'user_id', 'date', 'shift_id','shift_start','shift_end','weekly_off' | |
| ]; | |
| public function user() | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| public function shift() | |
| { | |
| return $this->belongsTo(Shift::class); | |
| } | |
| } |