Laravel 5.5
I want to change direction of api token that used in TokenGaurd so,
i created a custom guard named CafeTokenGaurd extends TokenGuard, i define __construct function into it like what i want, something like this:
public function __construct(UserProvider $provider, Request $request) {
parent::__construct($provider, $request);
$this->inputKey = 'api_key'; // I want changing this part
$this->storageKey = 'api_key';
}
Now i want to define api_key
from relation with users table like this:
device_user table -> token
i want to define specific tokens for each devices user have, and i want to set api key input and storage key to this column in pivot table between users and devices,
how i should this?!
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…