Commit 9d1713e0 authored by Guilhem's avatar Guilhem
Browse files

progress

parent 76059215
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -49,4 +49,24 @@ static function addUserToDive($ds_code, $us_id): View

    }



    function searchByName(Request $request){

        $search = $request['searchbar'];
        $terms = explode(' ', $search);

        $results = array();

        foreach($terms as $term){
            
            $query = User::selectRaw('*')
            ->where('US_NAME', '=', $term)
            ->orwhere('US_FIRST_NAME', $term)
            ->get();

        }

    }

}
+2 −0
Original line number Diff line number Diff line
@@ -123,3 +123,5 @@
Route::post('/modificationdives/members/{ds_code}/ajoutadherent/{us_id}', function($ds_code, $us_id){
    return AdherentController::addUserToDive($ds_code, $us_id);
});

Route::get('/modificationdives/members/{ds_code}/ajoutadherent/{level}', [AdherentController::class, 'searchByName']);
 No newline at end of file