anwar / attendance-sync
Kiosk attendance sync package for Laravel 10
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/anwar/attendance-sync
Requires
- php: ^7.3 || ^8.0
- illuminate/database: ^8.0 || ^9.0 || ^10.0
- illuminate/http: ^8.0 || ^9.0 || ^10.0
- illuminate/support: ^8.0 || ^9.0 || ^10.0
- illuminate/validation: ^8.0 || ^9.0 || ^10.0
Replaces
- kiosk/attendance-sync: 0.0.41
README
Configurable User Relationship
The AttendanceEmployee model can be configured to have a relationship with a User model. This is useful if you want to link an employee to a user in your application.
To enable this feature, you need to publish the attendance-sync-config configuration file:
php artisan vendor:publish --tag=attendance-sync-config
This will create a config/attendance-sync.php file in your application. You can then edit this file to specify the User model and the relationship name.
By default, the configuration looks like this:
<?php return [ 'user' => [ 'model' => env('ATTENDANCE_USER_MODEL', null), ], 'employee' => [ 'relations' => env('ATTENDANCE_EMPLOYEE_RELATIONS', ''), ], ];
You can set the ATTENDANCE_USER_MODEL environment variable to the fully qualified class name of your User model, and the ATTENDANCE_EMPLOYEE_RELATIONS environment variable to the name of the relationship.
For example, if your User model is App\Models\User and you want to load the user relationship, you would add the following to your .env file:
ATTENDANCE_USER_MODEL=App\Models\User
ATTENDANCE_EMPLOYEE_RELATIONS=user