Going through testing process and there are some issues that need fixed.
Familiar with Yii2 will be helpful
PHP and Bootstrap
MySql
I know not too many read these requirements before bidding and it makes for a prolonged process so this time I'm giving a skills test. I'll talk to the people that get it right.
The following code ...as it is will call up some of users friends.
If I switch the user_one_id and user_two_id around then the code will call up the rest of the users friends.
How would you make this bit of code work to call up all friends
Keep in mind that the code works perfectly both ways but each way only calls some friends
public static function getFriendsID()
{
$friends_id = [];
$friends = Friends::find()->where('user_one_id =:user_id', [':user_id' => Yii::$app->user->id])->asArray()->all();
if (!empty($friends)) {
foreach ($friends as $friend) {
$friends_id[] = (int)$friend['user_two_id'];
}
}
return $friends_id;
}
Hi there,
I understand and can make this code working to work with "all friends".
I'll need FTP access, along with steps to test (admin login if required, etc.)
Thanks
Rajesh Soni