芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/app/Models/TicketReply.php
belongsTo(Admin::class, 'admin_id'); } public function user() { return $this->belongsTo(User::class, 'user_id'); } public function ticket() { return $this->belongsTo(Ticket::class, 'ticket_id'); } public function file() { return $this->hasOne(File::class, 'ticket_reply_id'); } /** * create a New Ticket * * @param array $data * @return object */ public static function replyTicket(array $data): object { return self::create([ 'admin_id' => $data['admin_id'] ?? auth('admin')->id(), 'user_id' => $data['user_id'] ?? auth()->id(), 'ticket_id' => $data['ticket_id'], 'user_type' => $data['user_type'] ?? 'admin', 'message' => $data['message'] ]); } }