1.

What is Guarded Attribute in a Model ?

Answer»

It is the REVERSE of fillable. When a GUARDED SPECIFIES which fields are not mass assignable.

Example

class User extends MODEL {
     protected $guarded = ['user_type'];
}

 



Discussion

No Comment Found