PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/artisan on line 31
Laravel 5.1 uses the ::class property to get string representations of a fully qualified classname. The error you're seeing is caused by this line
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
This language feature has been introduced in PHP 5.5 which is a requirement of Laravel 5.1. Your installed PHP version is probably older than 5.5. Try to update your PHP binary.