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
Users Table

Users Table Laravel Package

baks-dev/users-table

BaksDev UsersTable is a user timekeeping and attendance module for PHP 8.4+ projects. Install via Composer, publish assets, and apply Doctrine migrations to get started. Test with PHPUnit using the users-table group. MIT licensed.

View on GitHub
Deep Wiki
Context7

BaksDev UsersTable is a time-tracking module for the BaksDev ecosystem, providing a structured way to record and manage employee work hours. It integrates with Doctrine for database persistence and supplies configuration and asset files for a consistent setup.

Designed for PHP 8.4+ and Symfony console workflows, the package offers a clean, migration-driven approach to extending your application with timesheet functionality.

  • Time-tracking module for recording user work hours
  • Doctrine migrations for schema setup and updates
  • Asset installation via baks:assets:install console command
  • PHPUnit test group for isolated, reliable testing
  • MIT licensed with release-tagged versioning (7.4.4)
Frequently asked questions about Users Table
How do I install baks-dev/users-table in a Laravel 10+ project?
Run `composer require baks-dev/users-table` to install the package. Then publish assets and run migrations with `php artisan baks:assets:install` followed by `php artisan migrate --path=vendor/baks-dev/users-table/migrations`. Always use `--pretend` first to validate SQL changes.
Does this package work with Laravel’s built-in authentication system?
Yes, the package assumes Laravel’s default `users` table for foreign key relationships (e.g., `user_id`). It integrates seamlessly with Laravel’s auth system, but you may need to extend policies or middleware for role-based attendance access.
What Laravel versions and PHP versions are supported?
The package requires **PHP 8.4+** and is optimized for **Laravel 10/11**. It leverages modern features like enums and attributes, so older Laravel versions (e.g., 9.x) will not work without significant refactoring.
Can I customize the attendance validation rules (e.g., max hours per week)?
The package provides a modular foundation, but custom validation logic (e.g., role-based overrides or geofencing) may require extending the model or creating custom policies. Check the `UserAttendance` model for hooks or override the `validate()` method in your application code.
Will this package conflict with existing custom fields in my users table?
Potential conflicts arise if your `users` table has custom columns (e.g., `employee_id`). The package uses `user_id` as a foreign key, so ensure your table structure aligns. Run `php artisan migrate --pretend` to preview schema changes before applying migrations.
Does baks-dev/users-table support multi-tenancy (e.g., Laravel Sail or Breeze)?
No, the package does not natively support multi-tenancy. You’ll need to manually adapt migrations or use tenant-aware tools like `stancl/tenancy` to scope attendance records per tenant. Foreign keys (e.g., `user_id`) must align with your tenancy strategy.
How do I test attendance logic in my Laravel application?
Run the package’s built-in tests with `php artisan test --group=users-table`. For integration testing, mock the `UserAttendance` model and test critical flows like punch-in/out validation. Use Laravel’s `RefreshDatabase` trait to reset migrations between tests.
Can I integrate this with Sanctum or Passport for API-based attendance tracking?
Yes, extend your Sanctum/Passport guards to include attendance endpoints. Use middleware like `auth:sanctum` or `auth:api` to restrict access. For complex workflows, create custom policies (e.g., `UserAttendancePolicy`) to authorize actions like `logAttendance`.
Are there any performance concerns with large-scale attendance logs?
The package doesn’t include built-in archiving, so high-volume logs may bloat your database. Mitigate this by implementing Laravel Queues to process reports asynchronously or use `softDeletes` to archive old records. Consider partitioning tables for very large datasets.
What alternatives exist for Laravel attendance/time-tracking?
Alternatives include `spatie/laravel-permission` (for role-based access), `laravel-shift` (shift scheduling), or `clockify/clockify-laravel` (third-party integrations). For GDPR compliance, evaluate `spatie/laravel-activitylog` to audit attendance changes. Choose based on your need for customization vs. plug-and-play functionality.
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.
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
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode