<commit_before><?php namespace Controllers\Admin;

use Accessory;
use Actionlog;
use AdminController;
use Asset;
use AssetMaintenance;
use Carbon\Carbon;
use Category;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\View;
use Input;
use League\Csv\Reader;
use License;
use Location;
use Model;
use Redirect;
use Setting;

class ReportsController extends AdminController
{

    /**
     * Show Report for Accessories
     *
     * @return View
     */
    public function getAccessoryReport()
    {
        $accessories = Accessory::orderBy('created_at', 'DESC')->get();
        return View::make('backend/reports/accessories', compact('accessories'));
    }

    /**
     * Export Accessories Report as CSV
     *<commit_msg>Fixes #1078<commit_after><?php namespace Controllers\Admin;

use Accessory;
use Actionlog;
use AdminController;
use Asset;
use AssetMaintenance;
use Carbon\Carbon;
use Category;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\View;
use Input;
use League\Csv\Reader;
use License;
use Location;
use Model;
use Redirect;
use Setting;
use User;

class ReportsController extends AdminController
{

    /**
     * Show Report for Accessories
     *
     * @return View
     */
    public function getAccessoryReport()
    {
        $accessories = Accessory::orderBy('created_at', 'DESC')->get();
        return View::make('backend/reports/accessories', compact('accessories'));
    }

    /**
     * Export Accessories Report as CSV
     *
{'fraction_non_alphanumeric': 0.1089588377723971, 'fraction_numerical': 0.002421307506053269, 'mean_word_length': 3.919642857142857, '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': '4928453', 'n_tokens_mistral': 495, 'n_tokens_neox': 494, 'n_words': 129}