尝试在打开页面时获取非对象错误的属性

时间:2019-04-08 18:06:22

标签: javascript php laravel laravel-5

出错,

  

ErrorException在       f57b041aa2e3a69a10cb002df5cb908ce419c9b9.php第45行:尝试       获取非对象的属性(查看:       C:\ xampp \ htdocs \ mta \ resources \ views \ alertproducts.blade.php)

如果我从数据库中删除了一些数据,那就可以了

@extends('layouts.app')
@section('content')    <div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2 everyData">
            <div class="panel panel-primary">
                <div class="panel-heading"><h3>Alert</h3>
                    <button class="btn btn-info btn-lg pull-right actionBtn"><span class="fa fa-print fa-2x"></span></button>
                    <button class="btn btn-info btn-lg pull-right pdf_btn"><span class="fa fa-download fa-2x"></span></button>
                </div>
                <div class="panel-body detailsDiv" id="alert_table">
                    <div class="text-center companyInfo">
                        <div class="img" style="display:inline-block;vertical-align:top; margin-top:6px;">
                            <img src="/resources/assets/uploads/logo/{{getTheCompanyFavicon()}}"
                                 alt="logo not found" width="30" height="30">
                        </div>
                        <div class="info" style="display:inline-block;">
                            <span style="font-size:30px; font-weight:bold;">{{getTheCompanyName()}}</span>
                        </div><br />
                        <span style="font-size:20px; font-weight:bold;">{{getTheCompanyAddress()}}</span><br />
                        <span style="font-size:15px; font-weight:bold;"> {{getTheCompanyPhnNo()}}  </sapn>

                    </div>

                    <table class="table" id="alert-list-table">
                        <div class="logo hidden">
                            <img class="logo"  src="/resources/assets/uploads/logo/{{ $companyInfo->logo }}"
                                 width="100" height="100" />
                        </div>
                        <div class="company_info hidden">
                            <h1 class="text-center companyName" >{{$companyInfo->company_name}}</h1>
                            <h5 class="text-center">Address: {{$companyInfo->address}}</h5>
                            <h6 class="text-center">Phone Number: {{$companyInfo->phone_number}}</h6>
                        </div>
                        <div class='company_info hidden'><h1>Alert List</h1></div>
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <thead>
                        <th>Product Name</th>
                        <th>Supplier Name</th>
                        <th class="hidden-xs print">Category</th>
                        <th>We Have</th>
                        <th class="hidden-xs">Alert</th>

                        </thead>
                        <tbody>
                        @foreach($alertLists as $alertList)
                        <tr>
                            <td>{{$alertList->product->product_name}}</td>
                            <td>{{$alertList->product->giveMeVendorName()}}</td>
                            <td class="hidden-xs print">{{$alertList->product->categoryName()}}</td>
                            <td >{{$alertList->quantity}}</td>
                            <td class="hidden-xs">{{$alertList->alert_quantity}}</td>
                        </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="printArea"></div>
    </div>
</div>
@endsection

0 个答案:

没有答案