| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App;
- use App\Services\DbOpenService;
- use App\Traits\ModelTimeFormat;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- use Illuminate\Support\Facades\DB;
- class OrderLogistic extends Model
- {
- use ModelLogChanging;
- use ModelTimeFormat;
- protected $fillable = [
- 'id',
- 'order_id',
- 'order_package_id',
- 'status',
- 'code',
- 'created_at'
- ];
- public function isExist($id= 0)
- {
- if (empty($id)) return false;
- return OrderLogistic::query()->selectRaw('id,status')->where('order_id','=',$id)->orderByDesc('id')->first();
- }
- }
|