In eloquent ORM, $fillable attribute is an array containing all those fields of table which can be filled using mass-assignment. Mass assignment refers to sending an array to the model to directly create a new record in Database.

class User extends Model {  

     protected $fillable = ['name', 'email', 'mobile'];   

     // All fields inside $fillable array can be mass-assigned  

}  
by Luka Tatarishvili
4 years ago
Laravel
model
0
Pro tip: use ```triple backticks around text``` to write in code fences