<commit_before><?php

namespace FairHub\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Http\Response;

use FairHub\Http\Requests\PressAccreditationRequest;
use FairHub\Http\Controllers\Controller;

class PressAccreditationController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        //need authentication
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return Response
     */
    public function create($role, $code)
    {
        $request = Request::capture();
        $inputs = $request->all();
        return view('press-accreditation.create');
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  Request  $request
     * @return Response
     */
    public function store(PressAccreditationRequest $request, $role, $code)
    {
        $params = $request->all();
        $validates = false;

        if (!$validates) {
            return redirect('press-register')->withInput($request->except('password'));
        }
        return \Redirect::route('thanks')
            ->with('message', 'Thanks for contacting us!');
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function show($id)
    {
        //need authentication
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function edit($id)
    {
        //need authentication
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  Request  $request
     * @param  int  $id
     * @return Response
     */
    public function update(Request $request, $id)
    {
        //need authentication
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function destroy($id)
    {
        //need authentication
    }
}
<commit_msg>working controller with qualifiche and work for<commit_after><?php

namespace FairHub\Http\Controllers;

use FairHub\DW_SOTTOCATEGORIE;
use FairHub\DW_UTILITA;
use Illuminate\Http\Request;
use Illuminate\Http\Response;

use FairHub\Http\Requests\PressAccreditationRequest;
use FairHub\Http\Controllers\Controller;

class PressAccreditationController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        //need authentication
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return Response
     */
    public function create($role, $code)
    {
        $request = Request::capture();
        $inputs = $request->all();
        $jobs = DW_UTILITA::type('LAVORO')->get();
        $workfor = [0=>trans('press.select.workfor')];
        foreach($jobs as $job){
            //we should use only query and not this trick,
            //it is necessary to build a clean structure before give it
            //to the view
            $workfor[$job->id] =$job->description;
        }

        $categories = DW_SOTTOCATEGORIE::visible(true)->qualifiche('VIR09')->get();
        $qualifications = [0=>trans('press.select.qualifications')];
        foreach($categories as $category){
            //we should use only query and not this trick,
            //it is necessary to build a clean structure before give it
            //to the view
            $qualifications[$category->id] =$category->description;
        }
        return view('press-accreditation.create', ['workfor' => $workfor, 'qualifications'=>$qualifications]);
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  Request  $request
     * @return Response
     */
    public function store(PressAccreditationRequest $request, $role, $code)
    {
        $params = $request->all();
        $validates = false;

        if (!$validates) {
            return redirect('press-register')->withInput($request->except('password'));
        }
        return \Redirect::route('thanks')
            ->with('message', 'Thanks for contacting us!');
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function show($id)
    {
        //need authentication
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function edit($id)
    {
        //need authentication
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  Request  $request
     * @param  int  $id
     * @return Response
     */
    public function update(Request $request, $id)
    {
        //need authentication
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function destroy($id)
    {
        //need authentication
    }
}

{'fraction_non_alphanumeric': 0.11839239754504059, 'fraction_numerical': 0.0007919223916056226, 'mean_word_length': 2.0305938812237554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, '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': '2137037', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1394, 'n_words': 377}