亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 laravel 中創建一個可共享的鏈接到公共

如何在 laravel 中創建一個可共享的鏈接到公共

PHP
搖曳的薔薇 2023-04-28 14:54:28
我有一個 laravel 項目,您只能使用電子郵件和密碼進入該項目創建客戶發票,有時管理員想使用 wtsapp 和電子郵件共享發票我們如何創建無需電子郵件和密碼即可公開的鏈接?這是刀片代碼示例<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貢獻1874條經驗 獲得超12個贊

auth只需從具有中間件并且應該可以工作的路由組中刪除 invoice 路由。

你的路線可能是這樣的yourapp.com/invoice/{invoice_id}。唯一的問題是,如果知道發票 ID,任何人都可以閱讀發票的內容。如果您使用增量 ID,情況可能會變得更糟。您可能需要考慮使用hashed_id列來防止這種情況發生。


查看完整回答
反對 回復 2023-04-28
  • 1 回答
  • 0 關注
  • 139 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號