Beispiel #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teachers = Teacher::topN(6);
     $articles = Article::topN(6);
     $categories_in_pane = ArticleCategory::all();
     return response()->view('site.classes', array('teachers' => $teachers, 'other_articles' => $articles, 'categories_in_pane' => $categories_in_pane));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $categories = ArticleCategory::all();
     $resp = view('admin.articleCreation', array('categories' => $categories));
     return $resp;
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id)
 {
     $news = Article::find($id);
     $languages = Language::all();
     $language = $news->language_id;
     $newscategories = ArticleCategory::all();
     $newscategory = $news->newscategory_id;
     return view('admin.news.create_edit', compact('news', 'languages', 'language', 'newscategories', 'newscategory'));
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function show($id)
 {
     //
     $teacher = Teacher::find($id);
     $teachers = Teacher::topN(6);
     $articles = Article::topN(6);
     $categories_in_pane = ArticleCategory::all();
     return response()->view('site.teacher', array('teacher' => $teacher, 'teachers' => $teachers, 'other_articles' => $articles, 'categories_in_pane' => $categories_in_pane));
 }
 public function index()
 {
     $article = Article::with('users')->limit(2)->orderBy('updated_at', 'desc')->get();
     $app = Application::with('users')->paginate(6);
     $ArticleCategory = ArticleCategory::all();
     $AppCategory = AppCategory::all();
     $test = AppCategory::with('applications')->where('name', '=', 'communication')->get();
     dd($test);
     return view('homepage.welcome', compact('article', 'app', 'ArticleCategory', 'AppCategory'));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //
     $teachers = Teacher::topN(6);
     $article = Article::find($id);
     $other_articles = Article::topN(6);
     $categories_in_pane = ArticleCategory::all();
     $article->content = MyUtil::replace_reference_tag($article->content) ?: $article->content;
     $resp = view('site.article', array('article' => $article, 'teachers' => $teachers, 'other_articles' => $other_articles, 'categories_in_pane' => $categories_in_pane));
     return $resp;
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function show($id, $pageNo)
 {
     //$category = ArticleCategory::with("articles")->find($id);
     $category = ArticleCategory::find($id);
     $teachers = Teacher::topN(6);
     //query()->orderBy('ord_no')->where('in_intro', '1')->take(6)->get();
     $articles = $category->articles()->getResults();
     $other_articles = Article::topN(6);
     $categories_in_pane = ArticleCategory::all();
     //dd($categories_in_pane);
     //$articleCnt = $category->articles()->getResults();
     $resp = view('site.category', array('category' => $category, 'teachers' => $teachers, 'articles' => $articles, 'other_articles' => $other_articles, 'categories_in_pane' => $categories_in_pane));
     //$resp = view('site.test', array('category'=>$category, 'teachers'=>$teachers, 'articles'=>$articles));
     return $resp;
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $articleCategories = ArticleCategory::all();
     $resp = view('admin.articleCategories', array('articleCategories' => $articleCategories));
     return $resp;
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $categories = ArticleCategory::all();
     return view('admin.categories.index', ['categories' => $categories]);
 }
 public function AllArticle()
 {
     $articles = Article::with('users')->paginate(6);
     $ArticleCategory = ArticleCategory::all();
     return view('Article.all_articles', compact('articles', 'ArticleCategory'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $data = ArticleCategory::all();
     return view('pages.admin.article-category.index', compact('data'));
 }