PHP-005 / Beginner
Mass assignment: passing $request->all() directly to create or update
Why is this a problem?
An attacker can submit additional fields not present in the form, such as is_admin or role, to change privileges.
How to fix it
php
// Model: protected $fillable = ['name', 'email', 'password'];
User::create($request->validated()); // Only fields allowed by FormRequest