Проблемы с laravel между localhost и хостингом - PullRequest
0 голосов
/ 12 ноября 2018

У меня следующая проблема, у меня есть проект в Laravel 5.7 на моем локальном компьютере, и я загружаю этот проект на свой хостинг на Bluehost, проблема в том, что у меня есть файл viewcustomers.blade.php на моем локальном хосте, работает нормально, безпроблемы, но на моем хостинге этот файл не работает ...

Это код:

@foreach($prendas as $prenda)
                            @if($clientes->id == $prenda->idcliente)
                                <tr>
                                    <td align="center"><img src="../images/clientes/{{$clientes->nombre}} {{$clientes->apellido}}/{{$prenda->fotoprenda1}}" width="150"></td>
                                    <td align="center">{{$prenda->prenda}}</td>
                                    <td align="center">{{$prenda->marca}}</td>
                                    <td align="center">{{$prenda->modelo}}</td>
                                    <td align="center">{{$prenda->anio}}</td>
                                    <td align="center">$  {{$prenda->limitcredit}}</td>
                                    @if($prenda->status == "Sin Prestamos")
                                        <td bgcolor="green">Sin Prestamos</td>
                                        <td><a href="{{url('/addpawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a></td>
                                    @elseif ($prenda->status == "En Empeño" and $prenda->restcredit < $prenda->limitcredit)
                                        <td bgcolor="red">Empeñada</td>
                                        <td><a href="{{url('/addmorepawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a></td>
                                    @elseif ($prenda->status == "En Empeño" and $prenda->restcredit >= $prenda->limitcredit)
                                        <td bgcolor="red">Empeñada</td>
                                        <td>Sin Limite de Credito</td>
                                    @endif

                                </tr>
                            @endif
                        @endforeach
                        <tr>
                            <td>       </td></tr>
                    </table>
                </div>
                <div class="col-sm-12">
                    <h3 class="text-center">Prestamos Actuales</h3>
                    <hr>
                    <center>
                        @if($prenda->status == "Sin Prestamos" and $clientes->id == $prenda->idcliente)
                           <a href="{{url('/addpawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a>
                        @elseif ($prenda->status == "En Empeño" and $prenda->restcredit < $prenda->limitcredit and $clientes->id == $prenda->idcliente)

                           <a href="{{url('/addmorepawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a>

                        @elseif ($prenda->status == "En Empeño" and $prenda->restcredit >= $prenda->limitcredit and $clientes->id == $prenda->idcliente)
                            <h2 class="text-danger">Sin Limite de Credito</h2>
                        @endif

И это проблема в статусе хостинга

=="Sin Prestamos" и $ clientes-> id == $ prenda-> idcliente):?> Idcliente. "/". $ Prenda-> id));?> "class =" btn btn-danger "> Статус Агрегара Престамо ==" En Empeño "и $ prenda-> restcredit limitcredit и $ clientes-> id == $ prenda-> idcliente):?>
                       <a href="<?php echo e(url('/addmorepawn/'.$prenda->idcliente."/".$prenda->id)); ?>"

class = "btn btn-danger"> Агрегар Престамо

                    <?php elseif($prenda->status == "En Empeño" and $prenda->restcredit >= $prenda->limitcredit and $clientes->id ==

$ prenda-> idcliente):?> Sin Limite de Credito Fecha Prestamo Cantidad Prestada Plazo Interes Паго Пятидесятилетний Феча Учебник Паго Всего Пагар Престамо СтатусBoleta de Empeño Arguments "Неопределенная переменная: prenda (Просмотр: /home/thealmfc/public_html/lonchedeadobada.xyz/resources/views/viewcustomers.blade.php)"

Любая идея? Спасибо

Ответы [ 2 ]

0 голосов
/ 13 ноября 2018

Проверьте свой код, вы закрыли @foreach неправильно

<div class="col-sm-12">
<h3 class="text-center">Prestamos Actuales</h3>
<hr>
<center>
    @if($prenda->status == "Sin Prestamos" and $clientes->id == $prenda->idcliente)
        <a href="{{url('/addpawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a>
    @elseif ($prenda->status == "En Empeño" and $prenda->restcredit < $prenda->limitcredit and $clientes->id == $prenda->idcliente)

        <a href="{{url('/addmorepawn/'.$prenda->idcliente."/".$prenda->id)}}" class="btn btn-danger">Agregar Prestamo</a>

    @elseif ($prenda->status == "En Empeño" and $prenda->restcredit >= $prenda->limitcredit and $clientes->id == $prenda->idcliente)
        <h2 class="text-danger">Sin Limite de Credito</h2>
    @endif

Здесь переменная $prenda находится вне области видимости. Вы закрыли @foreach перед этим фрагментом кода.

0 голосов
/ 12 ноября 2018

Ваш уровень ошибки отличается между вашим localhost и вашим хостингом.Установите

error_reporting(E_ALL); ini_set('display_errors', 1);

на свой локальный хост, и вы увидите ту же проблему

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...