Weave Code
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
User Manager

User Manager Laravel Package

com.panda180.laravel/user-manager

Simple Laravel package to retrieve users from your database. Install via Composer and call UserManager->getUsers() to fetch all users quickly. Works with Laravel 8+ and PHP 7.4+.

View on GitHub
Deep Wiki
Context7

Laravel User Manager is a lightweight Laravel package that simplifies retrieving user records from your database. It provides a clean UserManager API you can drop into any Laravel 8+ project to quickly fetch users without extra boilerplate.

Use it to standardize user lookups in your application and keep data-access code tidy and reusable.

Features

  • Fetch all users via a single getUsers() call
  • Simple, intuitive UserManager interface
  • Compatible with PHP 7.4+ and Laravel 8+
  • Minimal setup: install via Composer and start using immediately
Frequently asked questions about User Manager
How do I install and set up Laravel User Manager in my Laravel 8+ project?
Run `composer require com.panda180.laravel/user-manager` in your project root. No additional configuration is needed—just instantiate `UserManager` and call `getUsers()` to fetch records. The package works out-of-the-box with Laravel’s Eloquent ORM.
Does this package support Laravel 10 or PHP 8.1+? The description only mentions Laravel 8+ and PHP 7.4+.
The package explicitly supports Laravel 8+ and PHP 7.4+, but there’s no confirmation of Laravel 10 or PHP 8.x compatibility. Test thoroughly in your environment, or check the GitHub repo for updates. If unsupported, consider forking or extending the package.
Can I fetch users with pagination or custom query scopes (e.g., active users only)?
The current documentation doesn’t mention pagination or scopes. The `getUsers()` method likely returns all records by default. For custom queries, you may need to extend the `UserManager` class or use Eloquent’s built-in methods like `where()` or `paginate()` separately.
Is there a way to integrate this with Laravel’s authorization policies or gates?
The package focuses solely on fetching users and doesn’t include built-in authorization logic. You’ll need to manually apply Laravel’s policy system or gates after retrieving users. For example, use `Gate::forUser()` or `authorize()` on the fetched user objects.
Will this package work with non-standard user table names or custom Eloquent models?
The package assumes a standard `users` table and Eloquent `User` model. For custom tables or models, you’ll need to override the underlying query or configure the package to use your model class. Check the source code for dependency injection points.
Are there unit tests or examples to verify edge cases (e.g., empty results, null fields)?
The GitHub repository lacks visible tests or examples in the provided README. Without tests, edge cases like empty datasets or malformed data may require manual handling. Consider writing integration tests for critical paths.
Does this package support eager loading relationships (e.g., roles, permissions) when fetching users?
No, the package doesn’t mention eager loading. If your users have relationships (e.g., `roles`), you’ll need to manually add `with()` to the query or extend the `UserManager` class to support it. Example: `$users = User::with('roles')->get();`
How can I cache or optimize performance for large user datasets?
The package doesn’t include caching or performance optimizations. For large datasets, implement Laravel’s cache (e.g., `Cache::remember()`) or database indexing. Alternatively, use Eloquent’s `cursor()` for lazy loading or chunking.
Are there alternatives to this package for more advanced user management in Laravel?
For broader user management (CRUD, validation, auth), consider `spatie/laravel-permission`, `laravel/breeze`, or `laravel/fortify`. If you only need fetching, this package is lightweight, but lacks features like soft deletes or activity logs.
How do I handle sensitive user data (e.g., emails, passwords) when fetching users?
The package doesn’t filter sensitive fields by default. Explicitly exclude them using Eloquent’s `select()` or create a custom query. For passwords, use Laravel’s `Hash` facade to verify or mask values. Example: `$users->makeHidden(['password', 'remember_token']);`
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware