Keyboard.php 967 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Foundation\Auth\User as Authenticatable;
  5. use Illuminate\Notifications\Notifiable;
  6. use Laravel\Sanctum\HasApiTokens;
  7. /**
  8. * Admin
  9. * @mixin Builder
  10. * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
  11. */
  12. class Keyboard extends Authenticatable
  13. {
  14. use HasApiTokens, Notifiable;
  15. protected $table = 'keyboard';
  16. protected $hidden = ['created_at', 'updated_at'];
  17. protected $fillable = ['button', 'reply', 'id' ,'buttons' ,'image'];
  18. // protected $appends = ['menus_ids', 'menus_uris'];
  19. protected function getCreatedAtAttribute($value)
  20. {
  21. return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
  22. }
  23. protected function getUpdatedAtAttribute($value)
  24. {
  25. return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
  26. }
  27. }