Updated Main controller to use Laravel