Laravel Eloquent - 此页面无法正常工作 127.0.0.1 目前无法处理此请求。 HTTP 错误 500
Laravel Eloquent - This page isn’t working 127.0.0.1 is currently unable to handle this request. HTTP ERROR 500
我能够按地域和国家创建群组,效果很好(见图片附件)
控制器
$table_companies = Clients::selectRaw('geography geography, country country')->groupBy('geography', 'country')->get()->toArray();
return view('about.our-clients', compact('our-clients','table_companies'));
查看
@foreach ($table_companies as $geography)
<div class="row">
<div class="col-lg-12 text-center"
style="color:#000000">
<h2 class="bigFont text-center">
{{ $geography['geography'] }}
</h2>
</div>
@foreach ($table_companies as $country)
<div class="col-lg-12" style="padding:25px 0">
<h2 class="text-center"
style="background-color:#000000;
color:#ffffff;
font-size:1.4em;padding:5px 0;">
{{ $country['country'] }}
</h2>
</div>
<div class="col-lg-12">
<div class="row">
<!--Company names will be loaded here-->
</div>
</div>
@endforeach
</div>
<br><br>
@endforeach
当我尝试获取公司名称时问题就开始了
控制器
$table_companies = Clients::selectRaw('geography geography, country country, name_company company')->groupBy('geography', 'country', 'company')->get()->toArray();
查看
@foreach ($table_companies as $geography)
<div class="row">
<div class="col-lg-12" class="text-center" style="color:#000000">
<h2 class="bigFont text-center">
{{ $geography['geography'] }}
</h2>
</div>
@foreach ($table_companies as $country)
<div class="col-lg-12" style="padding:25px 0">
<h2 class="text-center"
style="background-color:#000000;
color:#ffffff;
font-size: 1.4em;
padding:5px 0;">
{{ $country['country'] }}
</h2>
</div>
<div class="col-lg-12">
<div class="row">
@foreach ($table_companies as $companies)
<div class="col-sm-4">{{ $companies['company'] }}</div>
@endforeach
</div>
</div>
@endforeach
</div>
@endforeach
这个页面打不开
127.0.0.1 目前无法处理此请求。
HTTP 错误 500
我求助于使用普通香草 php 来呈现页面并将它们按我想要的方式分组。谢谢。
我能够按地域和国家创建群组,效果很好(见图片附件)
控制器
$table_companies = Clients::selectRaw('geography geography, country country')->groupBy('geography', 'country')->get()->toArray();
return view('about.our-clients', compact('our-clients','table_companies'));
查看
@foreach ($table_companies as $geography)
<div class="row">
<div class="col-lg-12 text-center"
style="color:#000000">
<h2 class="bigFont text-center">
{{ $geography['geography'] }}
</h2>
</div>
@foreach ($table_companies as $country)
<div class="col-lg-12" style="padding:25px 0">
<h2 class="text-center"
style="background-color:#000000;
color:#ffffff;
font-size:1.4em;padding:5px 0;">
{{ $country['country'] }}
</h2>
</div>
<div class="col-lg-12">
<div class="row">
<!--Company names will be loaded here-->
</div>
</div>
@endforeach
</div>
<br><br>
@endforeach
当我尝试获取公司名称时问题就开始了
控制器
$table_companies = Clients::selectRaw('geography geography, country country, name_company company')->groupBy('geography', 'country', 'company')->get()->toArray();
查看
@foreach ($table_companies as $geography)
<div class="row">
<div class="col-lg-12" class="text-center" style="color:#000000">
<h2 class="bigFont text-center">
{{ $geography['geography'] }}
</h2>
</div>
@foreach ($table_companies as $country)
<div class="col-lg-12" style="padding:25px 0">
<h2 class="text-center"
style="background-color:#000000;
color:#ffffff;
font-size: 1.4em;
padding:5px 0;">
{{ $country['country'] }}
</h2>
</div>
<div class="col-lg-12">
<div class="row">
@foreach ($table_companies as $companies)
<div class="col-sm-4">{{ $companies['company'] }}</div>
@endforeach
</div>
</div>
@endforeach
</div>
@endforeach
这个页面打不开 127.0.0.1 目前无法处理此请求。 HTTP 错误 500
我求助于使用普通香草 php 来呈现页面并将它们按我想要的方式分组。谢谢。