function search()
 {
     if (!isset($_GET['q'])) {
         $q = "";
     } else {
         $q = $_GET['q'];
     }
     $movies = Movies::search($q);
     $view = new SearchResultsView(compact('movies', 'q'));
     $view->render();
 }
 function search()
 {
     if (!isset($_GET['q'])) {
         $q = "";
     } else {
         $q = $_GET['q'];
     }
     $threads = Thread::search($q);
     $view = new SearchResultsView(compact('threads'));
     $view->render();
 }