- Users get banned for 2 minutes if they tamper with task ids in url. (implemented by
laravel-temp-tagandlaravel-heymanpackage) - Banned users are allowed to see the task list but can not manage them.
- No user can have to than 10 daily tasks.
- It logs any validation errors, banning or tampering with url parameters for admin to review.
- Only one task can be at
doingstate - Task lists get cached
- The time of the day at which the task state has changed is shown on the list.
This is a sample usage of my laravel-temp-tag package. When you mark a daily-task as done, failed, skipped, etc and they will be automatically rollback to the default (not started) state at the end of the day. (without using any cron job)
Super easy setup, can be done in 5 minutes or less.
- Run
sudo git clone https://github.com/imanghafoori1/laravel-tasks.git laravel-tasks - From the projects root run
cp .env.example .env - Configure your
.env(optional since an sqlite database is provided) - Run
sudo composer updatefrom the projects root folder - From the projects root folder run
php artisan task:installto migrate, seed and generate key
You can login with:
email: hi@example.com pass: secret
email: bye@example.com pass: secret
/home/tasks/tasks/create/tasks/{id}/edit
We Tag the tasks as 'complete' until the end of the day:
$expireAt = Carbon::now()->endOfDay(); // 23:59:59 of today
tempTags($task)->tagIt('state', $expireAt, ['value' => 'done']);We remove the tag from the task when the user marks it as in-complete:
tempTags($task)->unTag('state');We fetch the 'complete' and 'incomplete' tasks like this:
Task::hasActiveTempTags('state', ['value' => 'done'])->get(); // tasks with "complete" tag.
Task::hasNotActiveTempTags('state', ['value' => 'not_started'])->get(); // tasks with no tag are incomplete ones.And that is all ! Super simple