Fix
This commit is contained in:
@@ -16,6 +16,11 @@ class Project extends BaseModel {
|
||||
return $this->hasMany( 'Offer' );
|
||||
}
|
||||
|
||||
public function offer()
|
||||
{
|
||||
return $this->hasOne( 'Offer' );
|
||||
}
|
||||
|
||||
public function projectemployees()
|
||||
{
|
||||
return $this->hasMany( 'Projectemployee' );
|
||||
@@ -105,10 +110,7 @@ class Project extends BaseModel {
|
||||
'projectleader' => function ( $q ) {
|
||||
$q->selectRaw( "id, CONCAT(firstname, ' ', middlename, ' ', lastname) AS fullname" );
|
||||
}] )
|
||||
->with( [
|
||||
'offers' => function ( $q ) {
|
||||
$q->whereArchive( 'F' );
|
||||
}] )
|
||||
->with( 'offer' )
|
||||
->with( [
|
||||
'projectemployees.user' => function ( $q ) {
|
||||
$q->selectRaw( "id, CONCAT(firstname, ' ', middlename, ' ', lastname) AS fullname" );
|
||||
|
||||
Reference in New Issue
Block a user