IndexController.php 697 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Http\Home;
  3. use App\Mail\SysErrorNotice;
  4. use Illuminate\Support\Facades\Log;
  5. use Illuminate\Support\Facades\Mail;
  6. use Illuminate\Support\Facades\Request;
  7. use Illuminate\Support\Facades\DB;
  8. class IndexController extends HttpBaseController
  9. {
  10. public function __construct()
  11. {
  12. parent::__construct();
  13. $this->setWebsite(__NAMESPACE__);
  14. }
  15. /**
  16. * 首页
  17. */
  18. public function index()
  19. {
  20. // 帮助中心
  21. $newsList = DB::table('news')->limit(9)->get();
  22. $productList = DB::table('product')->limit(100)->get();
  23. return view('home/http/index', ['newsList' => $newsList, 'productList' => $productList]);
  24. }
  25. }