<?php

namespace App\Http\Controllers\API\v1;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Exception;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Console\Output\BufferedOutput;

class TenantController extends Controller
{

    public function load_tenant(Request $request)
    {

    	try {
				$data_array['tenant'] = $request->tenant;
				$req = reqGest('POST', 'v1/tenant/load', $data_array);
				if ($req && $req['success']) {
					return sendResponse($req['data'], "DATA_GOT_SUCCESSFULLY");
				} else {
					return sendError("Please, contact administrators");
				}

			} catch (Exception $e) {
				return sendError("SERVER ERROR, PLEASE CONTACT ADMINISTRATOR", $e->getMessage(), 400);
			}

    }

}
