server/app/Models/User.php
// Get the current used api token from session storage or create a new one
Get the current used api token from session storage or create a new one
Get the current used api token from session storage or create a new one
public function authToken() {
        if (session('auth_token') == null) {
            session(['auth_token' => $this->createToken('API auth token for website')->plainTextToken]);
        }
        return session('auth_token');
    }
public function authToken ( ) { if ( session ( 'auth_token' ) == null ) { session ( [ 'auth_token' => $ this -> createToken ( 'API auth token for website' ) -> plainTextToken ] ) ; } return session ( 'auth_token' ) ; }
Get the current used api token from session storage or create a new one
Get the current used api token from session storage or create a new one