ProductGroup.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxCloudVps\Core\Models\Whmcs;
  3. use \Illuminate\Database\Eloquent\Model as EloquentModel;
  4. /**
  5. * Description of Product
  6. *
  7. * @author Paweł Złamaniec <pawel.zl@modulesgarden.com>
  8. */
  9. class ProductGroup extends EloquentModel
  10. {
  11. /**
  12. * Table name
  13. *
  14. * @var string
  15. */
  16. protected $table = 'tblproductgroups';
  17. protected $primaryKey = 'id';
  18. /**
  19. * Eloquent guarded parameters
  20. * @var array
  21. */
  22. protected $guarded = ['id'];
  23. /**
  24. * Eloquent fillable parameters
  25. * @var array
  26. */
  27. protected $fillable = ['id', 'name', 'headline', 'tagline', 'orderfrmtpl', 'disabledgateways', 'hidden', 'order', 'created_at', 'updated_at'];
  28. /**
  29. * The attributes that should be mutated to dates.
  30. *
  31. * @var array
  32. */
  33. protected $dates = ['updated_at', 'created_at'];
  34. /**
  35. * Indicates if the model should soft delete.
  36. *
  37. * @var bool
  38. */
  39. protected $softDelete = false;
  40. /**
  41. * Indicates if the model should be timestamped.
  42. *
  43. * @var bool
  44. */
  45. public $timestamps = false;
  46. public function __construct(array $attributes = [])
  47. {
  48. parent::__construct($attributes);
  49. }
  50. /**
  51. * Add relation to products
  52. */
  53. public function products()
  54. {
  55. return $this->hasMany("ModulesGarden\Servers\ProxmoxCloudVps\Core\Models\Whmcs\Product", "gid");
  56. }
  57. }