FormData.php 400 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class FormData extends Model
  5. {
  6. protected $table = 'form_data';
  7. protected $guarded = [];
  8. public function getStatusLabel()
  9. {
  10. if($this['status'] == 1) {
  11. return '<span class="label label-danger">未读</span>';
  12. }
  13. return '<span class="label label-success">已读</span>';
  14. }
  15. }