clientRepo = $clientRepo; } public function index() { $clients = Client::scope()->get(); $response = [ 'status' => 200, 'error' => false, 'clients' => $clients->toArray() ]; $response = json_encode($response, JSON_PRETTY_PRINT); return Response::make($response, 200, ['Content-Type' => 'application/json']); } }