Ive justed started using laravel and I am curious to know if laravel-4 offers role based mass assignment straight out of the box ?
I wish to allow some users access to those fields(via mass assignment), when editing/updating Information.
I believe Rails Active record has this feature.
class User < ActiveRecord::Base
attr_accessible :first, :last, :email # :default role
attr_accessible :can_fire_missiles, :as => :admin # :admin role
end
Nope! Laravel doesn't have the concept of "roles" out of the box. This may make for a good feature request.
You can, right now, define which fields are "hidden", which are "visible", and to your point, which are "fillable" (mass assignable) and which are not mass-assignable.