<commit_before><?php

namespace Suyabay\Http\Controllers;

use Suyabay\User;
use Suyabay\Role;
use Suyabay\Invite;
use Suyabay\Http\Requests;
use Illuminate\Http\Request;
use Illuminate\Database\QueryException;
use Suyabay\Http\Controllers\Controller;

class UserController extends Controller
{
    protected $mail;
    protected $response;

    /**
     * Display a listing of the resource.<commit_msg>[feature #115755943] Implement controller for endpoint api/v1/users<commit_after><?php

namespace Suyabay\Http\Controllers;

use Suyabay\User;
use Suyabay\Role;
use Suyabay\Invite;
use Suyabay\Http\Requests;
use Illuminate\Http\Request;
use Illuminate\Database\QueryException;
use Suyabay\Http\Controllers\Controller;

class UserController extends Controller
{
    protected $mail;
    protected $response;

    /**
     * This method return all users back to the calling API
     */
    public function getAllUsers()
    {
        $users = User::orderBy('id', 'asc')->get(['id', 'username', 'email', 'created_at', 'updated_at', 'avatar'])->toJson();

        return $users;
    }

    /**
     * Display a listing of the resource.
{'fraction_non_alphanumeric': 0.1146384479717813, 'fraction_numerical': 0.008818342151675485, 'mean_word_length': 4.022123893805309, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '396998', 'n_tokens_mistral': 362, 'n_tokens_neox': 368, 'n_words': 90}