MegaWm MegaWm - 5 months ago 12
PHP Question

When a syntax error gives the error 500?

The lav52.dev page isn’t working
lav52.dev is currently unable to handle this request.
500
laraver 5.2
ubuntu 14.04
php 5.6
lamp-server

Route::get('/','TestController@index');

class TestController extends Controller
{
function index()
{
echo "index" // I do not have a ;

}
}

Answer

You should set up apache's DocumentRoot to a public directory which is inside root Laravel project directory. I'm pretty sure you've set up it to a root directory, bot public, that's why you're getting 500 error.