AclHelper abstracts ACL logic, enabling reuse across controllers/repositories without duplicating security checks.FOSRestController, ClassResourceInterface), requiring adaptation for Laravel’s ecosystem (e.g., Eloquent, API Resources).symfony/security-acl) or a custom wrapper to translate Symfony’s AclHelper into Laravel’s Eloquent query builder.Builder to use AclHelper for where() clauses via a query scope or global scope.security_acl_class_entry, security_acl_object_identity, etc.), which may conflict with Laravel’s default auth systems (e.g., spatie/laravel-permission).->whereIn('id', $allowedIds)) if integration fails.Why Symfony ACL?
Scope of Security Needs
Maintenance Commitment
laravel-acl) that offer similar functionality with active support?Performance Impact
ROW LEVEL SECURITY) that could replace this?FOSRestController with Laravel’s Controller, translating AclHelper to Eloquent).HasAclScope) to filter queries via AclHelper.toArray() (post-query), though this defeats the package’s primary benefit.ROW LEVEL SECURITY for declarative security.users, roles, permissions tables).AclHelper with a sample entity and benchmark performance vs. post-query filtering.AclHelper, translating Symfony’s QueryBuilder to Eloquent.class LaravelAclHelper {
public function applyToQuery(Builder $query, string $entityClass, string $permission) {
// Convert Eloquent query to Symfony QueryBuilder equivalent
// Use AclHelper to filter, then convert back to Eloquent
}
}
AclHelper for root entities and fall back to post-query filtering for associations/fields.symfony/security-acl (v2.8+), which may conflict with Laravel’s symfony/console or other bundles.replace or a custom bridge.AclHelper in isolation.How can I help you explore Laravel packages today?