<commit_before><?php namespace Orchestra\Foundation\Routing;

use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Orchestra\Foundation\Processor\User as UserProcessor;
use Orchestra\Support\Facades\Site;

class UsersController extends AdminController
{
    /**
     * CRUD Controller for Users management using resource routing.
     *
     * @param  \Orchestra\Foundation\Processor\User    $processor
     */
    public function __construct(UserProcessor $processor)
    {
        $this->processor = $processor;

        parent::__construct();
    }

    /**
     * Setup controller filters.
     *
     * @return void
     */
    protected function setupFilters()
    {
        $this->beforeFilter('orchestra.auth');
        $this->beforeFilter('orchestra.manage:users');
        $this->beforeFilter('orchestra.csrf', array('on' => 'post'));
    }

    /**
     * List all the users.
     *
     * GET (:orchestra)/users
     *
     * @return Response
     */
    public function index()
    {
        return $this->processor->index($this, Input::all());
    }

    /**
     * Create a new user.
     *
     * GET (:orchestra)/users/create
     *
     * @return Response<commit_msg>Include PUT request as well.<commit_after><?php namespace Orchestra\Foundation\Routing;

use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Orchestra\Foundation\Processor\User as UserProcessor;
use Orchestra\Support\Facades\Site;

class UsersController extends AdminController
{
    /**
     * CRUD Controller for Users management using resource routing.
     *
     * @param  \Orchestra\Foundation\Processor\User    $processor
     */
    public function __construct(UserProcessor $processor)
    {
        $this->processor = $processor;

        parent::__construct();
    }

    /**
     * Setup controller filters.
     *
     * @return void
     */
    protected function setupFilters()
    {
        $this->beforeFilter('orchestra.auth');
        $this->beforeFilter('orchestra.manage:users');
        $this->beforeFilter('orchestra.csrf', array('on' => array('post', 'put')));
    }

    /**
     * List all the users.
     *
     * GET (:orchestra)/users
     *
     * @return Response
     */
    public function index()
    {
        return $this->processor->index($this, Input::all());
    }

    /**
     * Create a new user.
     *
     * GET (:orchestra)/users/create
     *
     * @return Response
{'fraction_non_alphanumeric': 0.12974296205630356, 'fraction_numerical': 0.0, 'mean_word_length': 2.4978601997146934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '7475864', 'n_tokens_mistral': 687, 'n_tokens_neox': 696, 'n_words': 144}