Skip to content

Commit 6bc0f74

Browse files
committed
Merge pull request #272 from LearningLocker/develop
Use the model
2 parents b339258 + 9a27205 commit 6bc0f74

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/locker/repository/Activity/EloquentActivityRepository.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ public function __construct( Activity $activity ){
2727
**/
2828
public function saveActivity( $activity_id, $activity_def ){
2929

30-
$exists = \DB::table('activities')->find( $activity_id );
30+
$exists = \Activity::find( $activity_id );
3131

3232
//if the object activity exists, remove and update with recent
3333
if( $exists ){
34-
\DB::table('activities')->where('_id', $activity_id)->delete();
34+
\Activity::where('_id', $activity_id)->delete();
3535
}
3636

3737
//save record
38-
\DB::table('activities')->insert(
38+
\Activity::insert(
3939
array('_id' => $activity_id,
4040
'definition' => $activity_def)
4141
);
4242

4343
}
4444

4545
public function getActivity( $activity_id ){
46-
return \DB::table('activities')->where('_id', $activity_id)->first();
46+
return \Activity::where('_id', $activity_id)->first();
4747
}
4848

4949
}

0 commit comments

Comments
 (0)