Laravel 4 Role Based Bulk Assignment
I've justed started using laravel and I'm curious to know if laravel-4 offers role-based mass assignment right out of the box?
I want to allow some users to access these fields (via bulk 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
+1
source to share
1 answer
Nope! Laravel has no concept of "roles" out of the box. This can lead to a nice feature request.
Now you can define which fields are "hidden", which are "visible", and to your point, which are "fillable" (assigned by masses) and which are not assignable .
+1
source to share