laravel/framework — pull request #5753 by RyanNielson (2014-09-16 19:08:40+00:00)
Title: Added some options for model fill/create including role based fillable rules

**These may still need some tweaks and work, so mainly looking for feedback.**

## Multiple fillable roles
This is a suggestion to improve fillable to make it easier to assign multiple values for fillable. This would be useful if a site had different roles, for example if an admin can edit things a user cannot. The goal is to also maintain backwards compatibility with the current way to define fillable. This is how it would be used.

```
['name', 'email'],
'admin' => ['name', 'email', 'role']
];
}

// When creating a model you can now do the following to control which "fillable" is used for mass assignment protection
User::create(Input::all(), 'default');
User::create(Input::all(), 'admin');
User::fill(Input::all(), 'admin');

// The following uses the default key, by default.
User::create(Input::all());
```

## Without Protection Option

I've also added another option called `without_protection` that will disable mass assignment protection for a single call to create, fill, etc. This would be simpler than calling guard and unguard over and over.

```
'Ryan', 'email' => 'email@example.com', 'age' => 25]);