Skip to content

Commit

Permalink
Merge pull request #16 from jarektkaczyk/5.4
Browse files Browse the repository at this point in the history
fixes back to master
  • Loading branch information
jarektkaczyk authored Sep 26, 2017
2 parents ae87508 + 44069d1 commit dc1666e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}
],
"require": {
"php": ">=5.5.9",
"illuminate/database": "5.2.*"
"php": ">=5.6.4",
"illuminate/database": "5.3.*|5.4.*"
},
"require-dev": {
"crysalead/kahlan": "~1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Builder extends EloquentBuilder
*/
protected $passthru = array(
'toSql', 'lists', 'insert', 'insertGetId', 'pluck', 'value', 'count', 'raw',
'min', 'max', 'avg', 'sum', 'exists', 'getBindings', 'aggregate',
'min', 'max', 'avg', 'sum', 'exists', 'getBindings', 'aggregate', 'getConnection'
);

/*
Expand Down
8 changes: 5 additions & 3 deletions src/Hookable.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ public function setAttribute($key, $value)
*/
public function save(array $options = [])
{
if (!parent::save($options)) {
if (!($saved = parent::save($options)) && $this->isDirty()) {
return false;
}

$hooks = $this->boundHooks(__FUNCTION__);
$params = compact('options');
$payload = true;
$destination = function () {
return true;
$destination = function () use ($saved) {
return $saved;
};

return $this->pipe($hooks, $payload, $params, $destination);
Expand Down Expand Up @@ -178,6 +178,8 @@ public function toArray()
/**
* Register hook for replicate.
*
* @param array|null $except
*
* @return mixed
*/
public function replicate(array $except = null)
Expand Down

0 comments on commit dc1666e

Please sign in to comment.