Skip to content

Commit

Permalink
PHP7: Typo, MongoDB\BSON\ObjectId instead MongoId
Browse files Browse the repository at this point in the history
  • Loading branch information
paul.bardack committed Jun 15, 2016
1 parent 1b1bedc commit 666d1bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"autoload": {
"psr-4": { "Nebo15\\Changelog\\": "src" }
},
"version": "0.1.1",
"version": "0.1.2",
"minimum-stability": "dev"
}

3 changes: 2 additions & 1 deletion src/Changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
namespace Nebo15\Changelog;

use MongoDB\BSON\ObjectID;
use Nebo15\REST\Traits\ListableTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
Expand Down Expand Up @@ -34,7 +35,7 @@ public static function createFromModel(Model $model, $author)
return self::create([
'author' => $author,
'model' => [
'_id' => new \MongoDB\BSON\ObjectId($model->{$model->getKeyName()}),
'_id' => new ObjectID($model->{$model->getKeyName()}),
'class' => get_class($model),
'table' => $model->getTable(),
'attributes' => $model->getAttributes()
Expand Down

0 comments on commit 666d1bf

Please sign in to comment.