TaskschedulerController.php 755 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Http\Request;
  4. use App\Http\Requests;
  5. use App\Models\Task;
  6. use Auth;
  7. class TaskschedulerController extends Controller
  8. {
  9. public function index(){
  10. date_default_timezone_set("Asia/Dhaka");
  11. $cdate = date('Y-m-d H:i:s');
  12. $sav = new Task;
  13. $sav->name = 'New task';
  14. $sav->type = 1;
  15. $sav->proj_id = 122;
  16. $sav->priority = 2;
  17. $sav->dead_line = $cdate;
  18. $sav->description = "description";
  19. $sav->created_time = $cdate;
  20. $sav->created_by = 2;
  21. $sav->status = 1;
  22. $sav->user_id=56;
  23. $sav->assign_by = 2;
  24. $sav->assign_time = $cdate;
  25. $sav->office_id = 55;
  26. $sav->save();
  27. }
  28. }