project
This commit is contained in:
@@ -32,12 +32,25 @@ class Project extends BaseModel {
|
||||
'projectleader' => function ( $q ) {
|
||||
$q->selectRaw( "id, CONCAT(firstname, ' ', middlename, ' ', lastname) AS fullname" );
|
||||
}] )
|
||||
->with( [
|
||||
'offers' => function ( $q ) {
|
||||
$q->whereArchive( 'F' )
|
||||
->with( [
|
||||
'payment' => function ( $q ) {
|
||||
$q->selectRaw( '*' );
|
||||
}] );
|
||||
}] )
|
||||
->with( 'customer' );
|
||||
|
||||
if($archive == 'F') $projects = $projects->whereArchive('F');
|
||||
if ( $archive == 'F' ) $projects = $projects->whereArchive( 'F' );
|
||||
|
||||
$projects = $projects->get();
|
||||
|
||||
return $projects;
|
||||
}
|
||||
|
||||
public static function removeProject( $projectID )
|
||||
{
|
||||
Project::whereId($projectID)->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user