AdminRoleModel.php 664 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. *------------------------------------------------------
  4. * AdminRoleModel.php
  5. *------------------------------------------------------
  6. *
  7. * @author m@9026.com
  8. * @date 2017/03/20 11:43
  9. * @version V1.0
  10. *
  11. */
  12. namespace App\Models;
  13. class AdminRoleModel extends BaseModel
  14. {
  15. /**
  16. * 数据表名
  17. */
  18. protected $table = "admin_roles";
  19. /**
  20. * 主键
  21. */
  22. protected $primaryKey = "id";
  23. /**
  24. * 可以被集体附值的表的字段
  25. */
  26. protected $guarded = [];
  27. public static function getStartOptions()
  28. {
  29. return self::where('id', '>', 1)->where('status',1)->get()->toArray();
  30. }
  31. }