Is it safe to use Model::unguard(); other than $fillable ?
For example, I want to keep the model unguarded and not use the fillable. It seems like unguard does the same thing as fillable. I want to know if it is secure and safe from SQL injection and other issues to use it like that.
CodePudding user response:
It's about mass assignment vulnerabilities. And you can look at the example of mass assignment vulnerability on https://ropesec.com/articles/mass-assignment/. It's actually depends on what you want to store on db.