12345678910111213141516171819202122232425 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class MjOrdersImport extends Model
- {
- protected $table = 'mj_orders_import';
- public $timestamps = false;
- protected static $unguarded = true;
- public static function delByCostId($id)
- {
- $info = OrderCost::select('task_id', 'month')
- ->where('id', $id)
- ->first();
-
- if(empty($info)){
- return false;
- }
- return self::where('task_id', $info->task_id)->where('month', $info->month)->update(['enable'=>0]);
- }
- }
|