Registrars.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
  3. use \Illuminate\Database\Eloquent\Model as EloquentModel;
  4. /**
  5. * Description of Registrars
  6. *
  7. * @var id
  8. * @var registrar
  9. * @var setting
  10. * @var value
  11. *
  12. * @autor ThurData <info@thrudata.ch>
  13. */
  14. class Registrars extends EloquentModel
  15. {
  16. /**
  17. * Table name
  18. *
  19. * @var string
  20. */
  21. protected $table = 'tblregistrars';
  22. protected $primaryKey = 'id';
  23. /**
  24. * Eloquent guarded parameters
  25. * @var array
  26. */
  27. protected $guarded = ['id'];
  28. /**
  29. * Eloquent fillable parameters
  30. * @var array
  31. */
  32. protected $fillable = ['registrar', 'setting', 'value'];
  33. /**
  34. * Indicates if the model should soft delete.
  35. *
  36. * @var bool
  37. */
  38. protected $softDelete = false;
  39. /**
  40. * Indicates if the model should be timestamped.
  41. *
  42. * @var bool
  43. */
  44. public $timestamps = false;
  45. public function __construct(array $attributes = [])
  46. {
  47. parent::__construct($attributes);
  48. }
  49. /*
  50. * Returns list of active whmcs registrar modules
  51. */
  52. public function getActiveList()
  53. {
  54. return $this->query()->getQuery()->select(['registrar'])->groupBy('registrar')->lists('registrar');
  55. }
  56. }