|
|
@@ -3,6 +3,7 @@
|
|
|
namespace App;
|
|
|
|
|
|
use App\Traits\ModelTimeFormat;
|
|
|
+use Carbon\Carbon;
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
use App\Traits\ModelLogChanging;
|
|
|
@@ -27,8 +28,9 @@ class Station extends Model
|
|
|
return $this->hasOne(StationTask::class)
|
|
|
->where('status','=','处理中');
|
|
|
}
|
|
|
- public function stationTasks(){
|
|
|
- return $this->hasMany(StationTask::class);
|
|
|
+ public function stationTasks_today(){
|
|
|
+ return $this->hasMany(StationTask::class)
|
|
|
+ ->where('created_at','>=',now()->format('Y-m-d'));
|
|
|
}
|
|
|
public function stationTypeBinMonitor(){
|
|
|
return $this->hasOne(StationTypeBinMonitor::class);
|