update v1.0.7.9
This commit is contained in:
@@ -38,11 +38,13 @@ class UserController extends Controller {
|
||||
public function getArticle(Article $article, Category $category, Settings $settings) {
|
||||
$setting = $settings->first();
|
||||
$pagination = $setting->pagination;
|
||||
if (\Auth::user()->role == 'user' || !Auth::check()) {
|
||||
if (!Auth::check() || \Auth::user()->role == 'user') {
|
||||
$article = $article->where('status', '1');
|
||||
}
|
||||
$article = $article->where('type', '1');
|
||||
$article = $article->orderBy('publish_time','desc');
|
||||
$article = $article->paginate($pagination);
|
||||
|
||||
$article->setPath('article-list');
|
||||
$categorys = $category->get();
|
||||
return view('themes.default1.client.kb.article-list.articles', compact('time', 'categorys', 'article'));
|
||||
|
@@ -35,6 +35,7 @@ class = "active"
|
||||
$article = App\Model\kb\Article::where('id', $id)->get();
|
||||
$article = $article->where('status', 1);
|
||||
$article = $article->where('type', 1);
|
||||
$article = $article->orderBy('publish_time','desc');
|
||||
//dd($article);
|
||||
?>
|
||||
@foreach($article as $arti)
|
||||
|
Reference in New Issue
Block a user