Beispiel #1
0
/**
 * Return a route pattern matching all the available pages.
 *
 * @return string
 */
function page_routes_pattern()
{
    try {
        $pages = \Flashtag\Core\Page::pluck('slug')->all();
    } catch (\PDOException $e) {
        $pages = null;
    }
    return implode('|', $pages ?: ['338e56cd45b6483dbe63c1616cd5feee']);
}
Beispiel #2
0
 public function home()
 {
     $mostViewed = Post::mostViewed(5)->get();
     $leastViewed = Post::leastViewed(5)->get();
     $postCount = Post::count();
     $categoryCount = Category::count();
     $tagCount = Tag::count();
     $pageCount = Page::count();
     return view('admin::home', compact('mostViewed', 'leastViewed', 'mostViews', 'leastViews', 'postCount', 'categoryCount', 'tagCount', 'pageCount'));
 }
Beispiel #3
0
 /**
  * @param int $id
  */
 public function destroy($id)
 {
     $page = Page::findOrFail($id);
     $page->delete();
 }
 public function index($page_id)
 {
     $page = Page::with('revisions')->findOrfail($page_id);
     return view('admin::pages.revisions.index', compact('page'));
 }