Download the PHP package uzair3/attendance without Composer
On this page you can find all versions of the php package uzair3/attendance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package attendance
- composer create-project laravel/laravel:^11.0 my-laravel-app
- in .env file set mysql connection...
- composer require uzair3/attendance and then php artisan migrate but following error came.
- specified key was too long issue was resolved by using Schema::defaultStringLength(191); in app\AppServiceProviders and "use Illuminate\Support\Facades\Schema;
- php artisan migrate to run all migrations.
- php artisan db:seed
-
Authentication.... laravel ui authentication with bootstrap krnay k liay following commands run ki. -composer require laravel/ui command was run... -- php artisan ui bootstrap --auth ...it asked to replace controller "yes" kia -- npm install and npm run dev was run....
-
Multi Role Authentication in Login Controller of main laravel application use Uzair3\Attendance\AuthRedirectsTrait;
use Illuminate\Http\Request; use AuthRedirectsTrait trait by add this line as trait use AuthRedirectsTrait;in Register controller of main laravel application
use Uzair3\Attendance\AuthRedirectsTrait; use Illuminate\Http\Request; use AuthRedirectsTrait; use it as a trait. protected function registered(Request $request, $user) { return $this->handleUserRedirection($user); } - Package has Attendance ServiceProvider in uzair3/attendance/src/AttendanceServiceProvider in this file there are $this->publishes that need to be published so we run php artisan vendor:publish command. select Uzair3\Attendance\AttendanceServiceProvider and publish it.
- Soft Deletes
User model in the host application must use Illuminate\Database\Eloquent\SoftDeletes.
use Illuminate\Database\Eloquent\SoftDeletes;
use HasFactory, Notifiable , SoftDeletes; - php artisan storage:link command to link the storage folder in the public folder this will create a storage folder in public folder. and in your User modal you have to allow profile_image in $fillable array like this give below. protected $fillable = [ 'name', 'email', 'password', 'profile_image' ];
-
automatic checkout php artisan schedule:work command can be run to automatic checkout after office closing time of office. for this to work your host application should have console.php and this file should have
use Illuminate\Support\Facades\Schedule; and Schedule::command('checkout:cron')->dailyAt('21:05'); // Schedule::command('checkout:cron')->everyMinute();