<?php
require 'vendor/autoload.php';
$app = require_once 'bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();

$request = Illuminate\Http\Request::create('/api/admin/settings', 'POST', [
    'auto_approve_listings' => '1',
]);
$controller = new App\Http\Controllers\Api\Admin\SettingController();
$response = $controller->update($request);
echo json_encode($response->getData());
echo "\nSetting from DB: " . App\Models\Setting::where('key', 'auto_approve_listings')->value('value');
