Skip to content

Commit

Permalink
result selects wrong vlaninterfaceid. Fixes #778.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhilliard committed Feb 11, 2022
1 parent 54678d6 commit d1278d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public function do( Request $r ): RedirectResponse|View
else if( preg_match( '/^\.\d{1,3}$/', $search ) || preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $search ) ) {
// IPv4 search
$type = 'ipv4';
$result = VlanInterface::leftJoin( 'ipv4address AS ip', 'ip.id', 'vlaninterface.ipv4addressid' )
$result = VlanInterface::select( 'vlaninterface.*' )
->leftJoin( 'ipv4address AS ip', 'ip.id', 'vlaninterface.ipv4addressid' )
->where( 'ip.address', 'LIKE', strtolower( '%' . $search ) )
->with( 'virtualInterface.customer' )->get();

Expand Down

0 comments on commit d1278d5

Please sign in to comment.