<?php
 namespace App\Http\Controllers\Main; use App\Http\Controllers\BaseController; use TechOnline\Laravel\Dao\ModelUtil; use TechOnline\Laravel\Http\Response; class ArticleController extends BaseController { public function index($id) { $article = ModelUtil::get('article', ['id' => $id]); if (empty($article)) { return Response::send(0, null, null, '/'); } return $this->_view('article.index', compact('article')); } }