Keyboard.php 647 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Models;
  3. use App\Constants\Util;
  4. /**
  5. * @property $group_id
  6. * @property $id
  7. * @property $button
  8. * @property $buttons
  9. * @property $image
  10. * @property $language
  11. * @property $explain
  12. * @property $reply
  13. *
  14. */
  15. class Keyboard extends BaseModel
  16. {
  17. protected $table = 'keyboard';
  18. protected $fillable = ['button', 'group_id', 'reply', 'id', 'buttons', 'image', 'language', 'explain'];
  19. protected function getImageAttribute($value)
  20. {
  21. return Util::ensureUrl($value);
  22. }
  23. protected function setImageAttribute($value)
  24. {
  25. $this->attributes['image'] = Util::replacePartInUrl($value);
  26. }
  27. }