Relatively new to the Laravel framework, and I can't figure out why the function is returning a blank page.
<?php
class MainController extends Controller {
public function setLanguage($language = 'nl', $page = 'index')
{
switch ($language) {
case 'nl':
$this->showNL();
break;
case 'fr':
echo $language . ' ' . $page;
break;
case 'de':
echo $language . ' ' . $page;
break;
default:
echo "nothing here";
}
}
public function showNL() {
return "Display some text";
}
}
The function showNL() is called but it just returns an empty html document. Also no laravel errors.