Street.php 558 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\common\models;
  3. /**
  4. * Created by PhpStorm.
  5. * Author: 芸众商城 www.yunzshop.com
  6. * Date: 2017/2/27
  7. * Time: 上午9:11
  8. */
  9. class Street extends BaseModel
  10. {
  11. public $table = 'yz_street';
  12. protected $guarded = [''];
  13. protected $fillable = [''];
  14. public $timestamps = false;
  15. public static function getStreetByParentId($parentId)
  16. {
  17. return self::where('parentid', $parentId)
  18. ->where('level', '4')
  19. ->get();
  20. }
  21. public function isLeaf()
  22. {
  23. return true;
  24. }
  25. }