Laravel Php Digital Ocean Git, projeto funciona local, mas da erros no Host (Digital OCean)

16/08/2019

4

Desenvolvi um forum p/ um projeto no meu trabalho e na minha maquina local funcionou tudo perfeitamente porem no host veio a dar alguns problemas, quanto mais eu olho a programação, mais vejo que está certa, funciona 100% local, porém da alguns problemas no host (Digital Ocean), pensei que poderia ser versão do PHP etc. Alguém pode por favor me ajudar estou com a cabeça queimando.

Obs: Ocorre erro 500 na pag do problema mas no local nao.

@extends(Config::get(''chatter.master_file_extend''))

@section(Config::get(''chatter.yields.head''))
<link href="/vendor/devdojo/chatter/assets/css/chatter.css" rel="stylesheet">
@stop


@section(''content'')

<div id="chatter" class="discussion">

<div id="chatter_header" style="background-color:{{ $discussion->color }}">
<div class="container" itemscope itemtype="http://schema.org/DiscussionForumPosting">
<a class="back_btn" href="/{{ Config::get(''chatter.routes.home'') }}"><i class="chatter-back"></i></a>
<h1 itemprop="headline">{{ $discussion->title }}</h1><span class="chatter_head_details">Postado na {{ Config::get(''chatter.titles.category'') }}<a class="chatter_cat" href="/{{ Config::get(''chatter.routes.home'') }}/{{ Config::get(''chatter.routes.category'') }}/{{ $discussion->category->slug }}" style="background-color:{{ $discussion->category->color }}">{{ $discussion->category->name }}</a></span>
</div>
</div>

@if(Session::has(''chatter_alert''))
<div class="chatter-alert alert alert-{{ Session::get(''chatter_alert_type'') }}">
<div class="container">
<strong><i class="chatter-alert-{{ Session::get(''chatter_alert_type'') }}"></i> {{ Config::get(''chatter.alert_messages.'' . Session::get(''chatter_alert_type'')) }}</strong>
{{ Session::get(''chatter_alert'') }}
<i class="chatter-close"></i>
</div>
</div>
<div class="chatter-alert-spacer"></div>
@endif

@if (count($errors) > 0)
<div class="chatter-alert alert alert-danger">
<div class="container">
<p><strong><i class="chatter-alert-danger"></i> {{ Config::get(''chatter.alert_messages.danger'') }}</strong> Please fix the following errors:</p>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
@endif

<div class="container margin-top">

<div class="row">

<div class="col-md-12">

<div class="conversation">
<?php $i = 0; ?>
<ul class="discussions no-bg" style="display:block;">
@foreach($posts as $post)
<?php $i++; ?>
<li data-id="{{ $post->id }}">
<span class="chatter_posts">
@if(!Auth::guest() && (Auth::user()->id == $post->user->id))
<div id="delete_warning_{{ $post->id }}" class="chatter_warning_delete">
<i class="chatter-warning"></i>Você tem certeza que quer deletar essa resposta?
<button class="btn btn-sm btn-danger pull-right delete_response">Sim deletar</button>
<button class="btn btn-sm btn-default pull-right">No Thanks</button>
</div>
<div class="chatter_post_actions">
<p class="chatter_delete_btn">
<i class="chatter-delete"></i> Deletar
</p>
<p class="chatter_edit_btn">
<i class="chatter-edit"></i> Editar
</p>
</div>
@endif


<div class="chatter_middle">
<span class="chatter_middle_details">
<!-- Se a contagem de posts for menor do que 2 significa que que busca os dados so do usuario -->
@if((count($posts)) < 2)
<!--<a href="{{ \\\\DevDojo\\\\Chatter\\\\Helpers\\\\ChatterHelper::userLink($post->user) }}">-->
<div class="chatter_avatar">
<span class="chatter_avatar_circle" style="background-color:#<?= \\\\DevDojo\\\\Chatter\\\\Helpers\\\\ChatterHelper::stringToColorCode($post->user->email) ?>">
{{ strtoupper(substr($post->user->nome, 0, 1)) }}
</span>
</div>
<h4 class="text-success"><strong>{{ ucfirst($post->user->{Config::get(''chatter.user.database_field_with_user_name'')}) }}</strong></h4>
<span class="ago chatter_middle_details">
{{ \\\\Carbon\\\\Carbon::createFromTimeStamp(strtotime($post->created_at))->diffForHumans() }}
</span>
@endif
<!--Se a contagem de posts for maior do que 1 significa que devo imprimir 1 usuario e resto de corretores-->
@if((count($posts)) > 1)
<!-- Imprima o uauario que perguntou sempre é o primeiro-->
@if($i == 1)
<div class="chatter_avatar">
<span class="chatter_avatar_circle" style="background-color:#<?= \\\\DevDojo\\\\Chatter\\\\Helpers\\\\ChatterHelper::stringToColorCode($post->user->email) ?>">
{{ strtoupper(substr($post->user->nome, 0, 1)) }}
</span>
</div>
<h4 class="text-success"><strong>{{ ucfirst($post->user->{Config::get(''chatter.user.database_field_with_user_name'')}) }}</strong></h4>
<span class="ago chatter_middle_details">
{{ \\\\Carbon\\\\Carbon::createFromTimeStamp(strtotime($post->created_at))->diffForHumans() }}
</span>
@else
<!-- Imprimir todos os corretores -->
@foreach($corretor->all() as $corr)
@if($post->user->id == $corr->id)
<div class="chatter_avatar">
<!-- se img do corretor existe mostra se nao mostra a ICONE -->
@if(strlen($corr->profile) > 0)
<?php $caminho = "http://www.imovelguide.com.br/profile/" . $corr->profile ?>
<img src="{{$caminho}}">
@else
<span class="chatter_avatar_circle" style="background-color:#<?= \\\\DevDojo\\\\Chatter\\\\Helpers\\\\ChatterHelper::stringToColorCode($post->user->email) ?>">
{{ ucfirst(substr($corr->name, 0, 1)) }}
</span>
@endif
</div>
<h4 class="text-success"> <h4 class="text-success"><strong>{{ ucfirst($corr->name) }} <strong> - </strong> <span class="text-dark"> {{ ucfirst($corr->points) }} Pontos</span></h4>
@endif
@endforeach
<span class="ago chatter_middle_details">
{{ \\\\Carbon\\\\Carbon::createFromTimeStamp(strtotime($post->created_at))->diffForHumans() }}
</span>
@endif
@endif
</span>
<div class="chatter_body"><?= $post->body ?></div>
</div>
<div class="chatter_clear"></div>
</span>
</li>
@endforeach
</ul>
</div>
@if(!Auth::guest())
<div id="new_response">
<div id="new_discussion">
<div class="chatter_loader dark" id="new_discussion_loader">
<div></div>
</div>
<form id="chatter_form_editor" action="/{{ Config::get(''chatter.routes.home'') }}/posts" method="POST">
<!-- BODY -->
<div id="editor">
<label id="tinymce_placeholder">Add the content for your Discussion here</label>
<textarea id="body" class="richText" name="body" placeholder="">{{ old(''body'') }}</textarea>
</div>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="chatter_discussion_id" value="{{ $discussion->id }}">
Gavin

Gavin

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários,
consulte nossa política de privacidade.

Aceitar