I am new to Laravel. i am working report Page in laravel project. i have four fields in search. field name is Firstname, status, fromDate , toDate, need to write laravel sample query for my below mentioned scenarios
Scenario 1:
if i enter Firstname =magnil and all other search fields empty then click search need to show list which having
Firstname as magnil
Scenario 2 :
if i enter satus=0 and all other search fields empty then click search need to show list which having status = 0 in database
Scenario 3 :
if i enter Firstname = magnil and status =1 and all other fields are empty then click search means i need query with where condition Firstname =manil and statu= 1 (Expected result -my database table don't have rows for these condtion)
This are the scenarios i need sample laravel query for above use case. my database table name is Dealer
Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire