projecten
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by Pensare Software.
|
||||
* User: Theo Weijmer
|
||||
* Date: 19/01/2018
|
||||
* Time: 15:51
|
||||
*/
|
||||
|
||||
class Projecthour extends BaseModel {
|
||||
|
||||
protected $table = "projecthours";
|
||||
|
||||
public function projectemployee()
|
||||
{
|
||||
$this->belongsTo( 'Projectemployee' );
|
||||
}
|
||||
|
||||
public static function saveProjecthour( $projecthourID, $projecthour )
|
||||
{
|
||||
$projecthour = (array) $projecthour;
|
||||
|
||||
if ( $projecthourID == 0 )
|
||||
{
|
||||
$projecthour = Projecthour::create( $projecthour );
|
||||
$projecthourID = $projecthour['id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
Projecthour::whereId( $projecthourID )->update( $projecthour );
|
||||
}
|
||||
|
||||
return $projecthourID;
|
||||
}
|
||||
|
||||
public static function removeProjecthour( $projecthourID )
|
||||
{
|
||||
Projecthour::whereId( $projecthourID )->delete();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user