GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/api/src/Controllers/
Upload File :
Current File : /home/serb/public_html/api/src/Controllers/AdController.php

<?php

namespace Mar\Controllers;

class AdController {

	public static function index() {
		$app = \Slim\Slim::getInstance();

		$adService = new \Mar\Services\AdService($app);

		$app->response->headers->set('Content-Type', 'application/json');

		$data = $adService->findAll()->asArray();
		$app->response->write(json_encode([
			'code' => 200,
			'count' => count($data),
			'data' => $data
		]));
	}

}

./BlackJoker Mini Shell 1.0