예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $posts = Post::all();
     $courses = Course::all();
     return view('admin.post.index', compact(array('posts', 'courses')));
 }
예제 #2
0
 public function dashboard()
 {
     $courses = Course::all();
     $posts = Post::all();
     return view('user.dashboard', compact('courses', 'posts'));
 }