Skip to content

Commit

Permalink
Revert "Add support for callables in model factories attributes (#20692
Browse files Browse the repository at this point in the history
…)"

This reverts commit 91765f5.
  • Loading branch information
themsaid authored Aug 24, 2017
1 parent d1a4bc5 commit 5dc9f54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Database/Eloquent/FactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Database\Eloquent;

use Closure;
use Faker\Generator as Faker;
use InvalidArgumentException;
use Illuminate\Support\Traits\Macroable;
Expand Down Expand Up @@ -264,7 +265,7 @@ protected function applyStates(array $definition, array $attributes = [])
protected function expandAttributes(array $attributes)
{
foreach ($attributes as &$attribute) {
if (is_callable($attribute)) {
if ($attribute instanceof Closure) {
$attribute = $attribute($attributes);
}

Expand Down

0 comments on commit 5dc9f54

Please sign in to comment.