Javascript 如何使laravel中的可共享链接公开

Javascript 如何使laravel中的可共享链接公开,javascript,php,jquery,laravel,Javascript,Php,Jquery,Laravel,我有一个laravel项目,您只能使用电子邮件和密码输入此项目创建客户发票,有时管理员希望使用wtsapp和电子邮件共享发票我们如何创建无需电子邮件和密码即可公开的链接? 下面是blade代码示例 <thead> <tr class="header" id="myHeader"> <th style="width: 20px">#</th> <th>Customer</th>

我有一个laravel项目,您只能使用电子邮件和密码输入此项目创建客户发票,有时管理员希望使用wtsapp和电子邮件共享发票我们如何创建无需电子邮件和密码即可公开的链接? 下面是blade代码示例

<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

#
顾客
单位
全部的
小计
收到
平衡
进展
@if(Auth::user()->角色<3)
好处
实际本
@恩迪夫
C福利
价格
日期
行动
@如果($invoice->已收金额<$invoice->小计)
{{$invoice->amount}
@其他($invoice->已收金额>$invoice->小计和$invoice->剩余金额>0)
{{$invoice->amount}
@恩迪夫

只需从路由组中删除发票路由,该路由组具有
auth
中间件,应该可以工作

您的路线可能类似于
yourapp.com/invoice/{invoice\u id}
。唯一的问题是,如果他们知道发票ID,任何人都可以阅读发票的内容。如果使用增量ID,事情可能会变得更糟。你可能想考虑使用<代码> HasHuffid ID>代码>列来防止这种情况发生。