$units * @property-read int|null $units_count * @method static \Illuminate\Database\Eloquent\Builder|Group newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Group newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Group onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|Group query() * @method static \Illuminate\Database\Eloquent\Builder|Group whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Group whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Group whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Group whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|Group whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|Group whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Group withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|Group withoutTrashed() * @mixin \Eloquent */ class Group extends Model { use HasFactory, SoftDeletes; protected $table = 'groups'; protected $guarded = ['id']; protected $casts = [ 'status' => DefaultStatusEnum::class, 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', ]; public function units(): BelongsToMany { return $this->belongsToMany(Unit::class, 'group_units'); } }