Created
June 7, 2018 12:24
-
-
Save almokhtarbr/4c76717da74b1926a1c0bbbc59a55cb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function search(Request $request){ | |
$searchQuery = request('query'); | |
$searchTerms = explode("|", $searchQuery ); | |
$orders = Order::whereIn('full_name',$searchTerms)->get(); | |
return view('orders.search')->with('orders',$orders); | |
} | |
------------------------------------------------------------------------------ | |
<form action="/search" method="get"> | |
{{ csrf_field() }} | |
<div class="form-group m-form__group"> | |
<label for="exampleTextarea"> | |
</label> | |
<textarea class="form-control m-input" id="exampleTextarea" rows="3" name="query"></textarea> | |
<br> | |
<button type="Submit" class="btn btn-primary"> | |
Submit | |
</button> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment