Skip to content

Commit

Permalink
Use native PHP function
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Sep 3, 2022
1 parent fcc2277 commit da06705
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Traits/HasTableAlias.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Znck\Eloquent\Traits;

use Illuminate\Support\Str;

trait HasTableAlias
{
/**
Expand All @@ -14,13 +12,13 @@ trait HasTableAlias
*/
public function qualifyColumn($column)
{
if (Str::contains($column, '.')) {
if (str_contains($column, '.')) {
return $column;
}

$table = $this->getTable();

if (Str::contains($table, ' as ')) {
if (str_contains($table, ' as ')) {
$table = explode(' as ', $table)[1];
}

Expand Down

0 comments on commit da06705

Please sign in to comment.