Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
295427b1e3
  1. 2
      resources/views/search/index.blade.php
  2. 2
      routes/web.php

2
resources/views/search/index.blade.php

@ -1,4 +1,4 @@
<form method="post" action="{{ route('results', 'search') }}">
<form method="post" action="{{ route('results') }}">
@csrf @csrf
<div class="form-group"> <div class="form-group">
<label for="search">Search</label> <label for="search">Search</label>

2
routes/web.php

@ -40,5 +40,5 @@ Route::get('/grain/{grainID}', [App\Http\Controllers\GraincardController::class,
Route::get('/yeast/{yeastID}', [App\Http\Controllers\YeastcardController::class, 'index'])->name('yeast'); Route::get('/yeast/{yeastID}', [App\Http\Controllers\YeastcardController::class, 'index'])->name('yeast');
Route::get('/hop/{hopID}', [App\Http\Controllers\HopcardController::class, 'index'])->name('hop'); Route::get('/hop/{hopID}', [App\Http\Controllers\HopcardController::class, 'index'])->name('hop');
Route::get('/adjunct/{adjunctID}', [App\Http\Controllers\AdjunctcardController::class, 'index'])->name('adjunct'); Route::get('/adjunct/{adjunctID}', [App\Http\Controllers\AdjunctcardController::class, 'index'])->name('adjunct');
Route::post('/search/results/{searchword}', [App\Http\Controllers\SearchController::class, 'search'])->name('results');
Route::post('search.results', [App\Http\Controllers\SearchController::class, 'search'])->name('results');
Route::get('search.results', [App\Http\Controllers\SearchController::class, 'index'])->name('search.results'); Route::get('search.results', [App\Http\Controllers\SearchController::class, 'index'])->name('search.results');
Loading…
Cancel
Save