Skip to content

Help : Praktik Penggunaan Pada Controller #21

Closed

Description

@nor-arifin

Saya membuat PatientController

public function create(){

    $client = new OAuth2Client;
    $token = $client->token(); // OAuth2Token anda akan muncul

    return view('pages.patients.create', compact('token'));
}

saya bermaksud ingin echo $token pada view,
muncul error berikut :
Typed property Satusehat\Integration\OAuth2Client::$organization_id must not be accessed before initialization

Apakah ada kesalahan penggunaan di saya ?
Screenshot 2024-03-22 234957

Activity

  1. ivanwilliammd commented on Mar 22, 2024

    @ivanwilliammd
    Owner

    Untuk organization_id seharusnya diinisialisasi pada .env

  2. ivanwilliammd commented on Mar 22, 2024

    @ivanwilliammd
    Owner

    Note : cara penggunaan bisa merujuk pada link ini https://github.com/ivanwilliammd/satusehat-laravel-example
    Setelah mengisi data pada .env coba akses http://127.0.0.1:8000/token

  3. Repository owner locked and limited conversation to collaborators on Jan 22, 2025
  4. converted this issue into a discussion #121 on Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions