generated from liutk/owl-admin-base
main
parent
5a74edfcdf
commit
c60f6fe5e6
|
|
@ -12,10 +12,10 @@ class IndexController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$banners = Ad::where('address', 'index-top')->show()->sort()->get();
|
$banners = Ad::where('address', 'index-top')->show()->sort()->get();
|
||||||
|
|
||||||
$examples = Article::where('category', 'examples')->show()->recommend()->sort()->limit(10)->get();
|
$examples = Article::where('category', 'examples')->show()->recommend()->sort()->limit(10)->get();
|
||||||
$news = Article::where('category', 'news')->show()->recommend()->sort()->get();
|
$news = Article::where('category', 'news')->show()->recommend()->sort()->get();
|
||||||
|
|
||||||
|
|
||||||
$company = settings()->get('company', '');
|
$company = settings()->get('company', '');
|
||||||
return view('index',compact('banners', 'examples', 'news', 'company'));
|
return view('index',compact('banners', 'examples', 'news', 'company'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class AdService extends BaseService
|
||||||
$columns = $this->getTableColumns();
|
$columns = $this->getTableColumns();
|
||||||
$model = $this->getModel();
|
$model = $this->getModel();
|
||||||
|
|
||||||
$isEnable = Arr::get($data, 'is_enabled');
|
$isEnable = Arr::get($data, 'is_enable');
|
||||||
$publishedAt = Arr::get($data, 'published_at');
|
$publishedAt = Arr::get($data, 'published_at');
|
||||||
if ($isEnable && empty($publishedAt)) {
|
if ($isEnable && empty($publishedAt)) {
|
||||||
$data['published_at'] = now();
|
$data['published_at'] = now();
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<p class="title">公司介绍</p>
|
<p class="title">公司介绍</p>
|
||||||
<div class="cont">
|
<div class="cont">
|
||||||
{{$company}}
|
{!! $company !!}
|
||||||
</div>
|
</div>
|
||||||
<a href="/company">更多</a>
|
<a href="/company">更多</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue