Initial commit for combined ProjectKP
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
$kernel->bootstrap();
|
||||
|
||||
$token = \App\Models\User::where('role', 'admin')->first()->createToken('test')->plainTextToken;
|
||||
|
||||
$response = \Illuminate\Support\Facades\Http::withToken($token)
|
||||
->acceptJson()
|
||||
->post('http://127.0.0.1:8000/api/penugasan/4/update-status', [
|
||||
'status' => 'proses',
|
||||
]);
|
||||
|
||||
echo "Status: " . $response->status() . "\n";
|
||||
echo "Body: " . $response->body() . "\n";
|
||||
Reference in New Issue
Block a user