我有一個(gè) laravel 項(xiàng)目,您只能使用電子郵件和密碼進(jìn)入該項(xiàng)目創(chuàng)建客戶發(fā)票,有時(shí)管理員想使用 wtsapp 和電子郵件共享發(fā)票我們?nèi)绾蝿?chuàng)建無需電子郵件和密碼即可公開的鏈接?這是刀片代碼示例<thead> <tr class="header" id="myHeader"> <th style="width: 20px">#</th> <th>Customer</th> <th>Units</th> <th>Total</th> <th>Sub Total</th> <th>Recieved</th> <th>Balance</th> <th>Advance</th> @if(Auth::user()->role < 3) <th>A Benefit</th> <th>Actual Ben</th> @endif <th>C Benefit</th> <th>S Price</th> <th>Date</th> <th>Action</th> </tr></thead>@if ( $invoice->received_amount < $invoice->subtotal ) <td style="color: red" data-changein="subtotal">{{ $invoice->amount }}</td>@elseif ( $invoice->received_amount > $invoice->subtotal && $invoice->amount_left > 0 ) <td style="color: #CC9A2E" data-changein="subtotal">{{ $invoice->amount }}</td>@endif
1 回答

HUWWW
TA貢獻(xiàn)1874條經(jīng)驗(yàn) 獲得超12個(gè)贊
auth
只需從具有中間件并且應(yīng)該可以工作的路由組中刪除 invoice 路由。
你的路線可能是這樣的yourapp.com/invoice/{invoice_id}
。唯一的問題是,如果知道發(fā)票 ID,任何人都可以閱讀發(fā)票的內(nèi)容。如果您使用增量 ID,情況可能會(huì)變得更糟。您可能需要考慮使用hashed_id
列來防止這種情況發(fā)生。
- 1 回答
- 0 關(guān)注
- 148 瀏覽
添加回答
舉報(bào)
0/150
提交
取消