Laravel 5.8: beberlei/assert/lib/Assert/functions.php return type produces error

I installed Laravel 5.8 on local server it works fine, but on remote server it reports the error

Parse error: syntax error, unexpected ':', expecting '{' in /***/vendor/beberlei/assert/lib/Assert/functions.php on line 37

This is the line producing the error

function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return Assert::that($value, $defaultMessage, $defaultPropertyPath);
}

I think the PHP version can't understand the return type or Scalar type string. The PHP version of the server is 7.3.13 and return type and scalar type sting are valid statement in this version but it still reports the error. Do any of you guys know why does this happen?

Thanks in advance



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3b4o7Yi
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time