public function index(){
// // we need to show all data from "blog" table
// $blogs = Blog::all();
// // show data to our view
// return view('blog.index',['blogs' => $blogs]);
$search = Request::get('search');
$blogs = Blog::where('title','like','%'.$search.'%')->orderBy('id')->paginate(6);
return view('blog.index',['blogs' => $blogs]);
}