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