Initial commit
This commit is contained in:
31
app/Models/Project.php
Normal file
31
app/Models/Project.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
|
||||
class Project extends Model
|
||||
{
|
||||
protected $guarded = [
|
||||
'id'
|
||||
];
|
||||
|
||||
// public function userInfo()
|
||||
// {
|
||||
// return $this->hasMany('App\Models\User', 'org_id', 'id');
|
||||
// }
|
||||
// public function phone(): HasOne
|
||||
// {
|
||||
// return $this->hasOne(Phone::class);
|
||||
// }
|
||||
public function userInfo(): HasMany
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
public function statusInfo(): HasMany
|
||||
{
|
||||
return $this->hasMany(ProjectStatus::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user