Why is the attribute 'key' and 'vars' not recognised

38 Views Asked by At
public function store (Request $request)
{
    $images = request()->file ( key:'file');
    dd( ...vars: $images);
}

Is the key: and ...var: attribute not reccognized in Laravel 5.8, because it keeps throwing syntax error at me?

1

There are 1 best solutions below

0
On

Missing $ sign with those keywords! Hope it helps.