Laravel search function, Search data in database using Model

  Рет қаралды 67,094

Code Online

Code Online

4 жыл бұрын

We added search feature to filter out the data from our model in Laravel.
we saw how to query data and fetch the data using model.We can also use live search using AJAX search request.
#search #laravel10 #nodejs #filter #querybuilder

Пікірлер: 51
@phamvanhoai621
@phamvanhoai621 2 жыл бұрын
thank you. Although I have not learned programming, but watching your videos I can customize my website by myself. 👍
@lionelmuskwe
@lionelmuskwe 2 жыл бұрын
Amazing video. Concise, effective and well explained. Thank you so much. I hope your channel grows well.
@bonheurtuyikunde5658
@bonheurtuyikunde5658 2 жыл бұрын
Thanks man. It is simple and easy yet works.
@kristapsb-d3401
@kristapsb-d3401 2 жыл бұрын
Lifesaver! Subbed and cant wait for more
@fidoz90
@fidoz90 3 жыл бұрын
Good job.. clean code wish you the best
@daybeamx
@daybeamx 4 жыл бұрын
Thank you so much! You helped me a lot!
@codeonline2683
@codeonline2683 4 жыл бұрын
Glad I could help!
@oengkimchhay
@oengkimchhay 3 жыл бұрын
thanks for ur videos I love it
@designerandprogrammer2036
@designerandprogrammer2036 4 жыл бұрын
Beautiful..keep it up...
@arturkhachatryan63
@arturkhachatryan63 3 жыл бұрын
Not need $searc_text = $_GET['QUERY']; Using Request or request helper; public function search(Request $request){ $search_text = $request->get('query'); }
@teteeu1432
@teteeu1432 2 жыл бұрын
Thanks, tried it here and it worked!
@codedose865
@codedose865 4 жыл бұрын
Thanks for the course #laravel #codeonline
@codedose865
@codedose865 4 жыл бұрын
yeah, Thank you code online... now i can search easily
@gaganpokharel7063
@gaganpokharel7063 4 жыл бұрын
Keep it up man👏😍
@Edvard-Aliev
@Edvard-Aliev 3 жыл бұрын
Спасибо мужик! Выручил!
@teteeu1432
@teteeu1432 2 жыл бұрын
Thank you, nice tutorial
@abdelhakdarbeida9046
@abdelhakdarbeida9046 3 жыл бұрын
thanks a lot you saved me from a big trouble 👍😍👏
@gujjupubg5226
@gujjupubg5226 2 жыл бұрын
Same here
@kapilbisht5832
@kapilbisht5832 Жыл бұрын
How to hide search in url ? Please reply
@ochienoeliud5723
@ochienoeliud5723 Жыл бұрын
Very helpful, thank you!
@codeonline2683
@codeonline2683 Жыл бұрын
You're welcome!
@DarmowyKursGrafiki
@DarmowyKursGrafiki Жыл бұрын
Hello my friend! You helped me a lot! Thank you :)
@codeonline2683
@codeonline2683 Жыл бұрын
Glad I could help!
@NoOne-qd2yp
@NoOne-qd2yp 3 жыл бұрын
Thank you for the video. Do you offer a paid course on How to Create a Simple Rental System? The Transactions form must have an Input Search Box for Customers, and another input Search Box for Items, Due Borrowed, Date Due.
@edwinombati9697
@edwinombati9697 3 жыл бұрын
thanks man keep it up
@utkarshshuklacse
@utkarshshuklacse Жыл бұрын
Thanks bro
@codeonline2683
@codeonline2683 Жыл бұрын
Welcome
@danishmirza5857
@danishmirza5857 2 жыл бұрын
404 NOT FOUND
@MortalKombatTS
@MortalKombatTS 2 жыл бұрын
Omg u are so faking goood, thanks for help my friend
@MortalKombatTS
@MortalKombatTS 2 жыл бұрын
just subscribed
@bryreyes2159
@bryreyes2159 Жыл бұрын
where does the category came from, ->with('category')
@AhsanKhan89
@AhsanKhan89 3 жыл бұрын
Brother. I am trying to remove the white space or ignore the white space between the column value on a where statement. For example a user may search for "B35 TYE" or "B35TYE" postcodes, so i need to match on the where statement whether the DB has values stores with or without spaces. $jobs->where('CollPCode','LIKE','%'.$colpostcode.'%'); I want to show these both in suggestion list "B35 TYE" and "B35TYE". Any suggestion? Thanks
@adawiyahabdjalil8156
@adawiyahabdjalil8156 3 жыл бұрын
hye! how to search with different table database?
@marijastevanovic7309
@marijastevanovic7309 4 жыл бұрын
Application doesn't show search record on page, but when i write dd() function it show me the correct record
@codeonline2683
@codeonline2683 4 жыл бұрын
I could help if you could paste code of your controller and view..
@trezstudio2055
@trezstudio2055 2 жыл бұрын
I need help
@yamanhafez2058
@yamanhafez2058 2 жыл бұрын
Thank Youu
@omareliotorrescastillo4808
@omareliotorrescastillo4808 3 жыл бұрын
Hello, thank you for your video, i am making the same as you but in search users in a database, i did exactly the same as you but when i look for a user in the search field using submit button i get the "Not Found page 404", instead of products i am using users database, above in the Not Found page i get /search?query=ramon, but wit Not found page
@abdulrahmanmohmmd1029
@abdulrahmanmohmmd1029 3 жыл бұрын
run php artisan route:cache
@myat5556
@myat5556 3 жыл бұрын
Thanks you your code online
@Shogunez
@Shogunez 3 жыл бұрын
i watched this full course man keep it up! but I'm having a problem with search function. Does it work on Laravel v5.4?
@codeonline2683
@codeonline2683 3 жыл бұрын
yeah try it and let me know what is the problem...
@Shogunez
@Shogunez 3 жыл бұрын
@@codeonline2683 i solved my problem. added argument to the function and made some changes
@Shogunez
@Shogunez 3 жыл бұрын
public function search(Request $req) { $search_text = $req->input('query'); $posts = Post::where('ner', 'LIKE', '%'.$search_text.'%')->get(); // dd($posts); return view('posts/search')->with('posts', $posts); }
@cuttyflame6804
@cuttyflame6804 2 жыл бұрын
@@Shogunez thank you that was helpful
@renatotravassos3359
@renatotravassos3359 2 жыл бұрын
thanks bro
@codeonline2683
@codeonline2683 Жыл бұрын
Any time
@ryanhernando9634
@ryanhernando9634 2 жыл бұрын
hello i want your help pls. guide me in my simple system projects I hope that I can communicate with you sirr plss. help
@patricjerold6923
@patricjerold6923 2 жыл бұрын
I need search.blade.php code....
@mrdr194
@mrdr194 3 жыл бұрын
public function search() { $search_text = $_GET ('query'); $products = Product::where('title','LIKE','%'.$search_text, '%')->get(); return view('products.search',compact('products')); }
@commercial-center6183
@commercial-center6183 2 жыл бұрын
"404" x_x
The Biggest Mistake Beginners Make When Web Scraping
10:21
John Watson Rooney
Рет қаралды 107 М.
whereAll() & whereAny() Search Functionality Laravel 11
13:55
Bluebird
Рет қаралды 1,4 М.
No empty
00:35
Mamasoboliha
Рет қаралды 9 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 4,6 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 111 МЛН
Laravel Migrations: 12 Useful Tips in 12 Minutes
12:06
Laravel Daily
Рет қаралды 79 М.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 138 М.
Laravel Live Search Using AJAX and JQUERY From Scratch
24:08
Great Adib
Рет қаралды 6 М.
What The HELL Went Wrong With SUICIDE SQUAD?
18:54
gameranx
Рет қаралды 1,1 МЛН
Eloquent or Query Builder: When to Use Which?
5:48
Laravel Daily
Рет қаралды 87 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 559 М.
Laravel Form Validation and Display Error Message
6:20
Code Online
Рет қаралды 10 М.
The Tools I Use to Build Products in Laravel
19:00
Josh Cirre
Рет қаралды 20 М.
You are using useFetch WRONG! (I hope you don't)
11:14
Alexander Lichter
Рет қаралды 23 М.
Laravel 10 Live search using jQuery Ajax | Laravel
36:57
Error Solution
Рет қаралды 1,1 М.
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 481 М.
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 10 МЛН
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН