Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
6a266f947d
  1. 4
      resources/views/search/index.blade.php
  2. 2
      routes/web.php

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

@ -1,4 +1,4 @@
<form method="post" action="{{ route('search.results') }}">
<form method="post" action="{{ route('search.results', 'search') }}">
@csrf @csrf
<div class="form-group"> <div class="form-group">
<label for="search">Search</label> <label for="search">Search</label>
@ -15,5 +15,5 @@
<input type="radio" id="yeasts" value="yeast" class="form-control" name="table" > <input type="radio" id="yeasts" value="yeast" class="form-control" name="table" >
<label for="">Yeasts</label> <label for="">Yeasts</label>
</div> </div>
<button type="submit" class="btn btn-primary">Add Mash Step</button>
<button type="submit" class="btn btn-primary">Search</button>
</form> </form>

2
routes/web.php

@ -40,4 +40,4 @@ 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::get('search.results', [App\Http\Controllers\SearchController::class, 'search'])->name('search.results');
Route::post('/search/results/{searchword}', [App\Http\Controllers\SearchController::class, 'search'])->name('search.results');
Loading…
Cancel
Save