How to define a fillable attributes on a Model in Laravel ?

You can define fillable attributes on a Model in Laravel by overiding fillable attribute of Eloquent Class.

class User extends Eloquent {
protected $fillable = array('first_name', 'last_name', 'email');
}

Leave a Reply

Your email address will not be published. Required fields are marked *