AssignProject.php 498 B

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