mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/tickme.git
synced 2026-08-21 13:34:02 +00:00
minor fixes
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Tasks;
|
||||
|
||||
|
||||
use App\Classes\ValueObjects\Constants\HttpStatus;
|
||||
use App\Classes\ValueObjects\Response\ApiResponseObject;
|
||||
use App\Models\ProjectMilestone;
|
||||
use App\Models\Task;
|
||||
use App\Models\TimeTracker;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TaskOrderController
|
||||
{
|
||||
|
||||
public function start(int $taskId){
|
||||
$task = Task::find($taskId);
|
||||
$task->trackers()->attach(Auth::user()->getAuthIdentifier(), ['time_start' => Carbon::now()]);
|
||||
|
||||
return (new ApiResponseObject('Timer Started Successfully',
|
||||
'You have successfully started the task timer',
|
||||
HttpStatus::OK_WITH_MESSAGE, []))->handler();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user