public function index() { $page_title = 'This is HomePage'; $posts = Post::latest('published_at')->published()->get(); $posts = Post::paginate(5); //dd($posts); return view('posts.index', compact('page_title', 'posts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { if (Request::get('filter')) { $records = Post::where('title', 'LIKE', '%' . Request::get('filter') . '%')->paginate(10); } else { $records = Post::paginate(10); } return view('back::scope.blog.posts.index', compact('records')); }
/** * Show the profile for the given user. * * @param int $id * @return Response */ public function getIndex() { return view('home') ->with('posts', Post::paginate(10)) ->with('title', 'Blog | Home') ->with('description','This is the Home Page Blog') ->with('category', Category::all()); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $limit = Input::get('limit') ?: 5; if ($limit > 15) { return $this->respondLimitNotAllowed('You are not allowed to fetch more than 15 posts per page.'); } $posts = Post::paginate($limit); return $this->respondWithPagination($posts, ['data' => $this->postTransformer->transformCollection($posts->all())]); }
/** * Display a listing of the resource. * * @return Response */ public function index(Request $request) { $search = ''; if ($search = $request->input('search')) { $posts = Post::where('title', "LIKE", "%" . $search . "%")->orWhere('body', "LIKE", "%" . $search . "%")->paginate(10); } else { $posts = Post::paginate(10); } return view('posts.index', compact('posts', 'search')); }
/** * Show the application dashboard to the user. * * @return Response */ public function index() { $user = \Auth::user(); $posts = \App\Post::all(); $posts = \App\Post::paginate(3); $users = \App\User::all(); $users = \App\User::paginate(3); $fiches = \App\Fiche::all(); if ($user->role == "teacher") { $fiches = \App\Fiche::paginate(3); } if ($user->role == "teacher") { return view('back.index', compact('posts', 'users', 'fiches', 'user')); } else { return view('backStudent.index', compact('fiches', 'user')); } }
public function index() { $posts = Post::paginate(); return view('posts/list', compact('posts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // $posts = Post::all(); $posts = Post::paginate(env('PAGINATION_MAX')); return view('backend.posts.index', compact('posts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $posts = Post::paginate(20); $section = Section::where('service_id', '1')->where('status', 1)->orderBy('sort_id')->get(); return view('admin.posts.index', compact('posts', 'section')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $posts = \App\Post::paginate(10); return view('posts.index', compact('posts')); }
public function manage() { $items_per_page = 10; $data['posts'] = App\Post::paginate($items_per_page); return view('blog/manage', $data); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $posts = $this->post->paginate(10); return view('admin.posts.index', compact('posts')); }
public function desktop() { $post = Post::paginate(5); return view('desktop', compact('post')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $posts = Post::paginate(5); $data = ['posts' => $posts]; return view('adminpage.post.post', $data); }
public function get() { $posts = Post::paginate(env('PAGINATION_MAX')); return $posts; }
public function index() { $posts = Post::paginate(15); return view('welcome', ['posts' => $posts]); }
public function index() { $posts = $this->postModel->paginate(5); return view('blog.index', compact('posts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $post = Post::paginate(15); return view('post.index', compact('post')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $limit = Input::get('limit') ?: 5; $posts = Post::paginate($limit); return $this->respondWithPaginate($posts, ['data' => $this->blogTransformer->transformCollection($posts->all())]); }
/** * Show the application dashboard. * * @return \Illuminate\Http\Response */ public function index() { $posts = Post::paginate(2); $data = ['posts' => $posts, 'nextpage' => $posts->nextPageUrl(), 'prevpage' => $posts->previousPageUrl()]; return view('home', $data); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $posts = Post::paginate(6); $posts->setPath('blog'); return view('posts.index', compact('posts')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $posts = Post::paginate(20); $sections = Section::all(); return view('admin.posts.index', compact('posts', 'sections')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $posts = Post::paginate(25); $posts->setPath('posts'); return view('post.index', ['posts' => $posts]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // $posts = Post::paginate(15); return view('admin.post.index', compact('posts')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('post.index', ['posts' => Post::paginate(10)]); }