mirror of
https://gh.llkk.cc/https://github.com/CaptainCore/captaincore-manager.git
synced 2025-10-03 14:04:44 +08:00
🐛 FIX: Provider selection
This commit is contained in:
parent
4ab086965d
commit
2d5c6d28bb
1 changed files with 3 additions and 2 deletions
|
@ -8,9 +8,10 @@ class Provider {
|
|||
|
||||
public function __construct( $provider_id = "" ) {
|
||||
if ( ! is_numeric( $provider_id ) ) {
|
||||
$lookup = ( new Providers )->where( [ "provider" => $provider_id ] );
|
||||
$lookup = Providers::where( [ "provider" => $provider_id ] );
|
||||
if ( count( $lookup ) > 0 ) {
|
||||
$provider_id = $lookup[0]->provider_id;
|
||||
$last_item_key = count($lookup) -1;
|
||||
$provider_id = $lookup[ $last_item_key ]->provider_id;
|
||||
}
|
||||
}
|
||||
$this->provider_id = $provider_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue