first push
This commit is contained in:
24
app/Http/Controllers/IndexController.php
Normal file
24
app/Http/Controllers/IndexController.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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'));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user