project
This commit is contained in:
@@ -11,6 +11,11 @@ class Offer extends BaseModel {
|
||||
|
||||
protected $table = "offers";
|
||||
|
||||
public function payments()
|
||||
{
|
||||
return $this->hasMany( 'Payment' );
|
||||
}
|
||||
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo( 'Project' );
|
||||
@@ -23,7 +28,7 @@ class Offer extends BaseModel {
|
||||
|
||||
public static function getAllOffers( $archive = 'F' )
|
||||
{
|
||||
$offers = Offer::orderBy('startdate')
|
||||
$offers = Offer::orderBy( 'startdate' )
|
||||
->with( 'customer' )
|
||||
->with( 'project' );
|
||||
|
||||
@@ -56,6 +61,6 @@ class Offer extends BaseModel {
|
||||
|
||||
public static function removeOffer( $offerID )
|
||||
{
|
||||
Offer::whereId($offerID)->delete();
|
||||
Offer::whereId( $offerID )->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user