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

Organizations Teams Api Laravel Package

liberusoftware/organizations-teams-api

A Laravel API package for managing organizations and teams, offering ready-made controllers, routes, and resources for members, roles, and team assignments. Plugs into your existing models and authentication with minimal setup.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is the presentation adapter for a separate Organizations & Teams domain module. Treat it as the HTTP/API skin — routes, controllers, request validation, and API resources — that sits in front of domain logic you install separately. It is not a standalone CRUD package, so the first thing to establish is which domain package it expects.

Minimal steps:

  1. composer require liberusoftware/organizations-teams-api
  2. Check composer.json in the installed package for its require block — it will name the domain/service package it adapts (something like liberusoftware/organizations-teams or a contracts package). Install that too if it is not pulled in transitively.
  3. Confirm the service provider is auto-discovered (php artisan package:discover), then look for publishable assets:
    php artisan vendor:publish --provider="Liberu\Organizations\Teams\Api\...ServiceProvider"
    
    Publish config and routes first; do not publish views or migrations you don't need.
  4. php artisan route:list --path=api — this is the single most informative command. The route table is the package's public contract, and it tells you the prefix, middleware, and route names you'll be writing tests against.
  5. Read src/Http/ top-down: Controllers → Requests → Resources. That ordering mirrors the request lifecycle and is faster than reading the README.

First use case: expose organization/team management to a frontend or SPA. Hit GET /api/organizations (or whatever prefix route:list reveals), authenticate with whatever guard the route middleware declares, and confirm the JSON envelope shape. Once you can list and show, create/update follows the same pattern.

Where to look first, in priority order:

  • composer.json — dependencies and autoload namespaces (tells you the adapter's real coupling).
  • routes/ — the surface area you inherit.
  • config/ — what is swappable without forking.
  • tests/ (if shipped) — the maintainers' own assumptions, more current than prose docs.
  • CHANGELOG / git tags — with 0 stars and 0 dependents, the commit history is your best documentation.

Be prepared to write your own README-style notes. With zero dependents and zero stars there is no Stack Overflow corpus and no blog posts; the source is the spec.

Implementation Patterns

Consume the routes, don't rebuild them. The adapter's value is that route definitions, form requests, and API resources are already wired to the domain. Register the provider, publish the route file if you need to change middleware, and leave the controllers alone until you have a reason.

Middleware stacking is the main integration point. Most day-to-day customization happens in the published route file:

Route::middleware(['api', 'auth:sanctum', 'tenant'])
    ->prefix('api/v1')
    ->group(base_path('routes/organizations-teams-api.php'));

Swap auth:sanctum for your guard, add rate limiters, add can: authorization middleware. This is cheaper and more upgrade-safe than overriding controllers.

Override by binding, not by forking. If the adapter resolves a domain service or repository from the container, rebind it in your own AppServiceProvider:

$this->app->bind(
    \Liberu\Organizations\Teams\Contracts\OrganizationRepository::class,
    \App\Repositories\TenantScopedOrganizationRepository::class
);

Use bind for per-request scoping (tenant-aware repositories), singleton only for stateless services. Never edit files in vendor/.

Subclass controllers when you need different serialization. Extend the package controller, override the relevant action, and repoint the route at your subclass. Keep the parent's method signature and return type so the adapter's own resource/response classes keep working.

API resources are the contract — pin them. If a frontend depends on the JSON shape, write a test that asserts the exact keys of the organization and team payloads. When you upgrade the package, that test is what tells you a resource changed. Prefer wrapping with your own resource (new MyOrganizationResource($org)) over mutating the vendor resource.

Compose, don't extend, for cross-cutting concerns. Audit logging, activity feeds, and webhooks fit better as listeners on domain events than as controller overrides. Look for an Events directory or EventServiceProvider registrations in the package and hook there.

Testing pattern. Feature-test the HTTP layer against route names rather than URLs, so a prefix change doesn't break the suite:

$this->actingAs($user)
     ->getJson(route('api.organizations.index'))
     ->assertOk()
     ->assertJsonStructure(['data' => [['id', 'name', 'slug']]]);

Use RefreshDatabase and the domain package's factories, not raw inserts — factory states will encode invariants (e.g. required owner membership) that you'd otherwise guess at.

Version your exposure deliberately. If the adapter ships unversioned routes, add the v1 prefix yourself in the published route file before any consumer integrates. Retrofitting versioning after clients exist is the expensive path.

Gotchas and Tips

License is NOASSERTION — resolve this before you build on it. That declaration means the repository has a license file the tooling could not map to a known SPDX identifier, or none at all. For a commercial product this is a genuine blocker: no explicit grant means default copyright applies. Open an issue asking the maintainers to add a standard license, or get written clarification. Do not treat "it's on GitHub" as permission.

Zero dependents means zero field testing. You are the first person to hit most edge cases. Budget time accordingly, read the source before assuming behavior, and pin an exact version ("liberusoftware/organizations-teams-api": "1.2.3") rather than a caret range. Commit composer.lock. If you can, vendor-fork it into a private registry so an upstream change can't break you overnight.

Release metadata looks off. The listed last release is dated 2026-10-26, which is in the future. That's a signal — likely a mistagged commit, a bad tag date, or an artifact of how the metadata was scraped. Verify with composer show -a liberusoftware/organizations-teams-api and check git log on the tag before trusting the version number as meaningful.

Provider and route collisions. These modular Liberu packages share a namespace family and similar prefixes. If you install more than one, watch for duplicate route names and two providers publishing to the same config key. Symptom: Route [api.organizations.index] not defined or the wrong controller firing. Diagnose with php artisan route:list -v and grep for duplicate names.

Publish selectively. vendor:publish with no --tag dumps everything and silently creates a maintenance burden — future upstream config changes will no longer reach you. Publish config only if you need to change values, and routes only if you need to change middleware.

Config caching is unforgiving. After changing anything in config/, run php artisan config:clear. In production, config:cache will freeze stale values, and a config key the package reads with config('organizations-teams.routes.prefix') will silently be null if you typo the published file name.

Debugging a failing request:

  • 404 → route not registered or prefix mismatch. route:list --path=organizations.
  • 401/403 → middleware or policy. route:list -v shows the middleware stack per route.
  • 422 → the package's form request rejected you; read src/Http/Requests/ for the exact rules, since validation messages are often the only place the field contract is written down.
  • 500 on a payload that looks valid → likely a domain-package service not bound. Check the exception for an Unresolvable dependency resolving... message and bind the interface.

Watch for tight coupling to the domain package's models. An adapter that type-hints concrete Eloquent models rather than interfaces makes swapping the persistence layer painful. Check src/Http/Controllers for Model $model route-model-binding signatures. If they're concrete, your extension points are limited to route middleware and container rebinding of services — plan accordingly and avoid building deep customizations on top.

Extension points worth knowing: published config (model and route customization), container bindings (repository/service substitution), route middleware (auth and tenancy), and domain events (side effects). Anything not reachable through those four means forking — at which point you should ask whether maintaining a private fork of a 0-star package is worth it versus writing the thin controller layer yourself against the domain package.

Honest summary for a team assessment. The concept is sound — separating API presentation from domain logic is the right architecture — but the package's ecosystem signals (0 stars, 0 dependents, unresolved license, anomalous release date) mean it carries adoption risk disproportionate to the code it saves. Prototype with it, measure how much controller/request/resource boilerplate it actually removes for your use case, and keep the option of consuming the domain package directly if the adapter's coupling or licensing gets in the way.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package