Skip to content

Commit

Permalink
Use end to get last element of array (#20844)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabialek authored and taylorotwell committed Aug 30, 2017
1 parent abdc31d commit 4276565
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function getForeignKeyName()
{
$segments = explode('.', $this->getQualifiedForeignKeyName());

return $segments[count($segments) - 1];
return end($segments);
}

/**
Expand Down

0 comments on commit 4276565

Please sign in to comment.