Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-locator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ajay Barthwal
store-locator
Commits
6e1f6b21
Commit
6e1f6b21
authored
Jul 25, 2019
by
Arpit Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Worked on pagination conditions
parent
2a26d8db
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
6 deletions
+25
-6
SearchController.php
application/app/Http/Controllers/SearchController.php
+2
-2
index.blade.php
application/resources/views/frontend/searchs/index.blade.php
+2
-2
location_element.blade.php
application/resources/views/frontend/searchs/location_element.blade.php
+10
-1
review_element.blade.php
application/resources/views/frontend/searchs/review_element.blade.php
+10
-0
web.php
application/routes/web.php
+1
-1
No files found.
application/app/Http/Controllers/SearchController.php
View file @
6e1f6b21
...
...
@@ -86,7 +86,7 @@ class SearchController extends Controller
}
public
function
search
l
ocater
(
Request
$request
)
public
function
search
L
ocater
(
Request
$request
)
{
$final
=
$this
->
getApiData
(
$request
[
'locality'
],
$request
[
'state'
],
$request
[
'city'
],
$request
[
'location'
],
$request
[
'ratingOrder'
],
$request
[
'page'
]);
...
...
@@ -97,7 +97,7 @@ class SearchController extends Controller
$meta
=
$final
[
'data'
][
'meta'
];
}
/** Set locality input box valuem, Set ratring dropdown value filter, Set page value */
$locality
=
$request
->
locality
;
$ratingOrder
=
$request
->
ratingOrder
;
...
...
application/resources/views/frontend/searchs/index.blade.php
View file @
6e1f6b21
...
...
@@ -103,7 +103,7 @@
e
.
preventDefault
();
$
.
ajax
({
type
:
'post'
,
url
:
"{{route('search
l
ocater')}}"
,
url
:
"{{route('search
L
ocater')}}"
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
locality
:
locality
,
location
:
location
,
state
:
state
,
city
:
city
,
ratingOrder
:
ratingOrder
},
success
:
function
(
datanew
)
{
loader
();
...
...
@@ -140,7 +140,7 @@
function
paginate
(
page
,
locality
,
state
,
city
,
location
,
ratingOrder
){
$
.
ajax
({
type
:
'post'
,
url
:
"{{route('search
l
ocater')}}"
,
url
:
"{{route('search
L
ocater')}}"
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
page
:
page
,
locality
:
locality
,
state
:
state
,
city
:
city
,
location
:
location
,
ratingOrder
:
ratingOrder
},
success
:
function
(
datanew
)
{
loader
();
...
...
application/resources/views/frontend/searchs/location_element.blade.php
View file @
6e1f6b21
...
...
@@ -106,7 +106,10 @@
$links
[
'next'
]
=
''
;
}
?>
@if($links['prev'] == '')
<li
class=
"page-item"
><i
class=
"mdi mdi-chevron-double-left"
></i></li>
<li
class=
"page-item"
>
<i
class=
"mdi mdi-chevron-left"
></i></li>
@else
<li
class=
"page-item"
>
<a
class=
"page-link"
id=
"first"
title=
"First"
data-page=
"{{ $links['first'][1] }}"
href=
"javascript:void(0);"
>
<i
class=
"mdi mdi-chevron-double-left"
></i>
...
...
@@ -117,6 +120,11 @@
<i
class=
"mdi mdi-chevron-left"
></i>
</a>
</li>
@endif
@if($links['next'] == '')
<li
class=
"page-item"
><i
class=
"mdi mdi-chevron-right"
></i></li>
<li
class=
"page-item"
><i
class=
"mdi mdi-chevron-double-right"
></i></li>
@else
<li
class=
"page-item"
>
<a
class=
"page-link"
title=
"Next"
href=
"javascript:void(0);"
id=
"next"
data-page=
"@if(@$links['next']) {{ $links['next'][1] }} @else @endif"
name=
"next"
aria-label=
"Next"
>
<i
class=
"mdi mdi-chevron-right"
></i>
...
...
@@ -125,6 +133,7 @@
<li
class=
"page-item"
>
<a
class=
"page-link"
title=
"Last"
id=
"last"
data-page=
"{{ $links['last'][1] }}"
href=
"javascript:void(0);"
><i
class=
"mdi mdi-chevron-double-right"
></i></a>
</li>
@endif
</ul>
</nav>
</div>
...
...
application/resources/views/frontend/searchs/review_element.blade.php
View file @
6e1f6b21
...
...
@@ -47,6 +47,10 @@
}
?>
@if(
$reviewData['links']['prev']
== '')
<li class="
page
-
item
"><i class="
mdi
mdi
-
chevron
-
double
-
left
"></i></li>
<li class="
page
-
item
"> <i class="
mdi
mdi
-
chevron
-
left
"></i></li>
@else
<li class="
page
-
item
">
<a class="
page
-
link
" id="
first
" title="
First
" data-page="
{{
$reviewData
[
'links'
][
'first'
][
1
]
}}
" href="
javascript
:
void
(
0
);
">
<i class="
mdi
mdi
-
chevron
-
double
-
left
"></i>
...
...
@@ -57,6 +61,11 @@
<i class="
mdi
mdi
-
chevron
-
left
"></i>
</a>
</li>
@endif
@if(
$reviewData['links']['next']
== '')
<li class="
page
-
item
"><i class="
mdi
mdi
-
chevron
-
right
"></i></li>
<li class="
page
-
item
"><i class="
mdi
mdi
-
chevron
-
double
-
right
"></i></li>
@else
<li class="
page
-
item
">
<a class="
page
-
link
" title="
Next
" href="
javascript
:
void
(
0
);
" id="
next
" data-page="
@
if
(
@
$reviewData
[
'links'
][
'next'
])
{{
$reviewData
[
'links'
][
'next'
][
1
]
}}
@
else
@
endif
" name="
next
" aria-label="
Next
">
<i class="
mdi
mdi
-
chevron
-
right
"></i>
...
...
@@ -65,6 +74,7 @@
<li class="
page
-
item
">
<a class="
page
-
link
" title="
Last
" id="
last
" data-page="
{{
$reviewData
[
'links'
][
'last'
][
1
]
}}
" href="
javascript
:
void
(
0
);
"><i class="
mdi
mdi
-
chevron
-
double
-
right
"></i></a>
</li>
@endif
</ul>
</nav>
</div>
...
...
application/routes/web.php
View file @
6e1f6b21
...
...
@@ -16,7 +16,7 @@
});*/
Route
::
get
(
'/'
,
'SearchController@index'
)
->
name
(
'search'
);
Route
::
post
(
'search
locater'
,
'SearchController@searchlocater'
)
->
name
(
'searchl
ocater'
);
Route
::
post
(
'search
Locater'
,
'SearchController@searchLocater'
)
->
name
(
'searchL
ocater'
);
Route
::
get
(
'autocomplete'
,
'SearchController@autocomplete'
)
->
name
(
'autocomplete'
);
Route
::
get
(
'detail/{slug}'
,
'SearchController@detail'
)
->
name
(
'detail'
);
Route
::
post
(
'reviewPaginate'
,
'SearchController@reviewPaginate'
)
->
name
(
'reviewPaginate'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment