New Laravel install on Digital Ocean, Ubuntu. Current PhP install. Apache2 is accessing Php just fine as I added a couple lines of code to spit out errors. This is the output:
Parse error: syntax error, unexpected '=' in /var/www/html/blog/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388
public static function pluck($array, $value, $key = null)
{
$results = [];
[$value, $key] = static::explodePluckParameters($value, $key);
foreach ($array as $item) {
$itemValue = data_get($item, $value);
// If the key is "null", we will just append the value to the array and keep
// looping. Otherwise we will key the array using the value of the key we
// received from the developer. Then we'll return the final array form.
if (is_null($key)) {
$results[] = $itemValue;
} else {
$itemKey = data_get($item, $key);
if (is_object($itemKey) && method_exists($itemKey, '__toString')) {
$itemKey = (string) $itemKey;
}
$results[$itemKey] = $itemValue;
}
}
return $results;
}
Line 888 is:
[$value, $key] = static::explodePluckParameters($value, $key);
Laravel automatically creates a key when creating a new site with "laravel new (site name)"
Server is running my other sites just fine. I've done several clean Laravel installs, same problem.