Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Administrator Laravel Package

forone/administrator

Forone Administrator is a Laravel package for quickly building admin panels and CRUD interfaces. It offers forms, grids, filters, user and permission management, menus, and customizable dashboards, helping developers create back-office tools with minimal code.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Verify the runtime first. This package targets Laravel 5.2 (PHP 5.6/7.0 era). It will not install cleanly on Laravel 5.5+ or PHP 8 without forking. Confirm your app is on 5.2 before anything else.
  • Install: composer require forone/administrator. Because 5.2 predates package auto-discovery, you must manually add the service provider (and likely the facade/alias) to config/app.php.
  • Publish and migrate:
    php artisan vendor:publish
    php artisan migrate
    
    This publishes config/administrator.php, views, and public assets, and creates the RBAC tables (users/roles/permissions/menus).
  • Create your first admin user using the seeded credentials or the package's user-management screen, then log in at the configured route (typically /admin).
  • Where to look first:
    1. config/administrator.php — route prefix, auth guard, DB connection, upload paths, title/branding.
    2. The package's base controller and Grid/Form builder classes under vendor/forone/administrator/src — these are your extension surface.
    3. The published resources/views/vendor/administrator templates — fastest way to understand layout and extension points.
  • First real use case: point the admin at an existing Eloquent model. Create a controller that extends the package's admin base controller, implement the grid() and form() methods, and register the route/menu entry. You get list + create/edit/delete + filtering in a few dozen lines.

Implementation Patterns

  • One controller per resource. The dominant pattern is a thin controller extending the package base, with two declarative methods:
    • grid() — columns, searchable/filterable fields, row actions, batch actions, pagination.
    • form() — fields, input types, validation rules, and saving/saved callbacks for business logic.
  • Declarative over imperative. Treat grid/form definitions like schema. Keep them pure; push side effects into model events or form callbacks so you can reuse the same model elsewhere.
  • RBAC by route name. Permissions are typically bound to route names, and menus are DB-driven. The day-to-day workflow is: define controller/routes → seed or create a permission record → attach it to a role → add the menu entry → clear caches.
  • Menu as configuration-in-DB. Rather than hardcoding navigation, insert menu rows. For multi-tenant or environment-specific menus, seed them per environment and keep a seeder in version control.
  • View overrides beat forking. Publish the views and override individual Blade partials (grid cell renderers, form field wrappers) instead of editing vendor files — this keeps upgrades/patches possible.
  • Custom field types. For domain-specific inputs (rich text, relation pickers, file/media), extend the form field builder rather than hacking raw HTML into the form definition.
  • File uploads. Route uploads through the configured disk/path in administrator.php; keep the storage path outside public and serve via a controller if you need access control.
  • Integration with existing auth. Point the guard at your users table if you already have one, but be aware the RBAC tables assume the package's user model — most teams keep a separate admin user table to avoid collisions.
  • Testing. Since the admin is mostly declarative, smoke-test the generated routes (list, create, edit, delete) with HTTP tests and assert permission-denied paths; that catches most breakage from grid/form edits.

Gotchas and Tips

  • Version lock-in is the biggest risk. Laravel 5.2 only, effectively unmaintained (0 dependents, no recent activity). Plan for it as a bounded internal tool, not a long-lived foundation. Audit any fork before adopting.
  • Manual provider registration. Forgetting the service provider or alias in config/app.php produces confusing "class not found" / route-not-registered errors. This is the #1 setup failure.
  • Config caching. After editing administrator.php or menu data, run php artisan config:clear and any package cache clear. Stale config silently ignores your changes.
  • Asset paths break under subdirectories. Published assets often assume the app is served from /. If you deploy under a subpath, override the asset URL in config/views.
  • Route-name coupling. Renaming a controller route silently strips permissions — the role still has an old permission that matches nothing. Grep your permission seeds whenever routes change.
  • Migrations vs. existing schema. The package ships user/role/menu migrations. On an app that already has a users table, collisions are common; review migrations and rename tables via config before running.
  • Debugging grids. When a grid returns wrong columns or N+1 queries, check eager loading in the grid definition and inspect DB::listen / query log — the builder can be chatty on relations.
  • Timezone/locale defaults. Date columns and validation messages default to the package's (Chinese) conventions; override locale files and formatting callbacks explicitly.
  • Documentation is largely Chinese. Budget time for reading the source and examples. The src/ tree and published views are the real documentation.
  • Extension points to prefer: published views, form/grid callbacks, custom field classes, and model events. Avoid editing vendor/ — you lose the ability to patch or replace the package.
  • Security posture. Treat the admin as internet-facing only behind IP allowlists or a separate guard; older Laravel 5.2 admin panels are a common target. Keep dependencies patched and add CSRF/rate-limit middleware at the route level if the package doesn't.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings