<commit_before><?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SearchController extends Controller
{
    // recherche full
    public function index(Request $request)
    {

          // recherche parrains
          $datas['individus'] = \App\Individu::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          // recherche communes
          $datas['communes'] = \App\Commune::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          // recherche département
          $datas['departements'] = \App\Departement::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          // recherche région
          $datas['regions'] = \App\Region::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          return view('search', ['datas' => $datas]);

    }<commit_msg>Recherche par departement<commit_after><?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SearchController extends Controller
{
    // recherche full
    public function index(Request $request)
    {

          // recherche parrains
          $datas['individus'] = \App\Individu::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          // recherche communes
          $datas['communes'] = \App\Commune::where('nom', 'LIKE', '%'.$request->input('query').'%')
          ->orWhere('code', 'LIKE', '%'.$request->input('query').'%')
          ->get();

          // recherche département
          $datas['departements'] = \App\Departement::where('nom', 'LIKE', '%'.$request->input('query').'%')

          ->orWhere('code', 'LIKE', '%'.$request->input('query').'%')

          ->get();

          // recherche région
          $datas['regions'] = \App\Region::where('nom', 'LIKE', '%'.$request->input('query').'%')->get();

          return view('search', ['datas' => $datas]);

    }
{'fraction_non_alphanumeric': 0.2320855614973262, 'fraction_numerical': 0.0, 'mean_word_length': 2.9224318658280923, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '7379020', 'n_tokens_mistral': 576, 'n_tokens_neox': 569, 'n_words': 96}