Area.php 449 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. //use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Area extends Model{
  6. // use SoftDeletes;
  7. protected $table='area';
  8. public $timestamps = false;
  9. public function getAreaList($condition){
  10. return self::query()->where($condition)->get();
  11. }
  12. public function getAreaInfo($condition){
  13. return self::query()->where($condition)->first();
  14. }
  15. }