app/Http/Controllers/Admin/DashboardController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $title = $this->title;
        $url = $this->url;
        $videos = Video::all();
        $views = Video::sum('views');
        $likes = Video::sum('like');
        $comments = Comment::all();
        return view('admin.index', compact('title', 'url', 'videos', 'views', 'likes', 'comments'));
    }
public function index ( ) { $ title = $ this -> title ; $ url = $ this -> url ; $ videos = Video :: all ( ) ; $ views = Video :: sum ( 'views' ) ; $ likes = Video :: sum ( 'like' ) ; $ comments = Comment :: all ( ) ; return view ( 'admin.index' , compact ( 'title' , 'url' , 'videos' , 'views' , 'likes' , 'comments' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//