25 lines
460 B
PHP
25 lines
460 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Advert;
|
|
use App\Models\File;
|
|
|
|
class IndexController extends Controller
|
|
{
|
|
|
|
/**
|
|
* Notes: 首页
|
|
* @Author: 玄尘
|
|
* @Date : 2020/6/1 9:11
|
|
*/
|
|
public function index()
|
|
{
|
|
$adverts = Advert::where('category_id', 7)->latest()->get();
|
|
$file = File::where('status', 1)->latest()->first();
|
|
|
|
return view('index.index', compact('adverts', 'file'));
|
|
}
|
|
|
|
}
|