AssignTask2.php 494 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class AssignTask extends Model
  5. {
  6. public $timestamps = false;
  7. protected $table = "assign_task";
  8. public function user()
  9. {
  10. return $this->hasOne('App\User','id','user_id');
  11. }
  12. public function proj()
  13. {
  14. return $this->hasOne('App\Models\Project','id','proj_id');
  15. }
  16. public function task_name()
  17. {
  18. return $this->hasOne('App\Models\Task','id','task_id');
  19. }
  20. }