优化代码
This commit is contained in:
commit
792c2ce6ca
@ -71,10 +71,12 @@ public function update(Request $request, WorkOrder $workOrder): RedirectResponse
|
||||
//
|
||||
|
||||
$request->validate([
|
||||
'title' => 'required|string|max:255',
|
||||
'status' => 'required|string|in:open,closed,read,user_read,replied,user_replied,on_hold,in_progress',
|
||||
]);
|
||||
|
||||
$workOrder->update($request->all());
|
||||
$workOrder->update([
|
||||
'status' => $request->status
|
||||
]);
|
||||
|
||||
return back()->with('success', '工单更新成功');
|
||||
}
|
||||
|
@ -36,7 +36,11 @@
|
||||
<a href="{{ route('admin.users.edit', $host->user_id) }}"> {{ $host->user->name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $host->price }} 元
|
||||
@if ($host->managed_price !== null)
|
||||
<span class="text-danger">{{ $host->managed_price }}</span>
|
||||
@else
|
||||
{{ $host->price }} 元
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $host->created_at }}
|
||||
@ -57,8 +61,4 @@
|
||||
{{-- 分页 --}}
|
||||
{{ $hosts->links() }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
Loading…
Reference in New Issue
Block a user