[Solved] Laravel file validation – how fix “variable is immediately overridden”


Just group all your rules in one time variable :

$rules['movie'] = ['file', 'required', 'max:200000', new Mp4File];

Why do you want to have 2 lines for the same index ?

solved Laravel file validation – how fix “variable is immediately overridden”