KnowallController.php 967 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Http\Controllers\Web\Content;
  3. use App\Exceptions\ResponseException;
  4. use App\Http\Controllers\Web\WebBaseController;
  5. use Illuminate\Http\Request;
  6. use App\Services\Content\ArticleService;
  7. class KnowallController extends WebBaseController
  8. {
  9. protected $articleService;
  10. public function __construct( ArticleService $articleService)
  11. {
  12. $this->articleService = $articleService;
  13. }
  14. public function index()
  15. {
  16. //获取工作动态、校园招聘、重要通知的数据
  17. $article_map = array(
  18. 'type_id' => array(13,14,15,16,17,18,19,25,26,27,28,29),
  19. 'limit' => 16,
  20. 'titlelen' => 25,
  21. 'dot' => '...'
  22. );
  23. $articles = $this->articleService->getArticleCache($article_map, 'home');
  24. $return_data = array(
  25. 'articles' => $articles
  26. );
  27. return view('app.content.knowall.index',$return_data);
  28. }
  29. }