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
935cf551
Commit
935cf551
authored
Jul 19, 2019
by
Arpit Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed banner and times in detail page
parent
e6058045
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
23 deletions
+84
-23
City.php
application/app/City.php
+31
-0
CronController.php
application/app/Http/Controllers/CronController.php
+21
-0
SearchController.php
application/app/Http/Controllers/SearchController.php
+3
-2
headmast.png
application/public/headmast.png
+0
-0
style.css
application/public/vendor/frontend/css/style.css
+2
-2
detail.blade.php
application/resources/views/frontend/searchs/detail.blade.php
+26
-19
web.php
application/routes/web.php
+1
-0
No files found.
application/app/City.php
0 → 100644
View file @
935cf551
<?php
namespace
App
;
use
Illuminate\Notifications\Notifiable
;
use
Illuminate\Database\Eloquent\Model
;
use
Kyslik\ColumnSortable\Sortable
;
class
City
extends
Model
{
use
Notifiable
;
use
Sortable
;
protected
$table
=
'cities'
;
public
$sortable
=
[
'id'
,
'name'
,
'state'
,
'created_at'
,
'updated_at'
];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'name'
,
'state'
];
}
application/app/Http/Controllers/CronController.php
View file @
935cf551
...
...
@@ -8,7 +8,10 @@ use Validator;
use
App\Traits\Apitraits
;
use
App\Locater
;
use
App\Page
;
use
App\City
;
use
Illuminate\Support\Facades\Hash
;
use
Illuminate\Support\Facades\Storage
;
class
CronController
extends
Controller
...
...
@@ -54,4 +57,21 @@ class CronController extends Controller
]);
}
public
function
getCity
(){
$file
=
Storage
::
disk
(
'public'
)
->
exists
(
'city.json'
);
$body
=
Storage
::
get
(
'city.json'
);
$cityData
=
json_decode
(
$body
,
true
);
foreach
(
$cityData
as
$data
){
$city
=
new
City
;
$city
->
name
=
$data
[
'name'
];
$city
->
state
=
$data
[
'state'
];
$city
->
save
();
}
return
response
()
->
json
([
'status'
=>
'success'
,
'data'
=>
'Updated Sucessfully'
]);
}
}
\ No newline at end of file
application/app/Http/Controllers/SearchController.php
View file @
935cf551
...
...
@@ -8,6 +8,7 @@ use App\Helpers\Apihelpers;
use
App\Traits\Apitraits
;
use
App\Locater
;
use
App\Page
;
use
App\City
;
use
DB
;
use
Validator
;
use
Illuminate\Support\Facades\Hash
;
...
...
@@ -86,8 +87,8 @@ class SearchController extends Controller
$finalData
=
$final
[
'data'
][
'finalData'
];
$links
=
$final
[
'data'
][
'links'
];
$meta
=
$final
[
'data'
][
'meta'
];
return
view
(
'frontend.searchs.index'
,
compact
(
'finalData'
,
'links'
,
'meta'
));
$getCity
=
City
::
distinct
()
->
get
(
'state'
)
->
toarray
();
return
view
(
'frontend.searchs.index'
,
compact
(
'finalData'
,
'links'
,
'meta'
,
'getCity'
));
}
else
{
return
response
()
->
json
([
'status'
=>
'error'
,
'data'
=>
'No data found!'
]);
...
...
application/public/headmast.png
0 → 100644
View file @
935cf551
694 KB
application/public/vendor/frontend/css/style.css
View file @
935cf551
...
...
@@ -299,8 +299,8 @@ body.list-view .location_data aside {
background
:
#ffffff
;
box-shadow
:
2px
2px
2px
2px
rgba
(
0
,
0
,
0
,
0.02
);
min-height
:
150px
;
position
:
absolute
;
top
:
-50%
;
/*
position: absolute;
top: -50%;
*/
transform
:
translateY
(
-50%
);
padding
:
1.25rem
;
z-index
:
1
;
}
...
...
application/resources/views/frontend/searchs/detail.blade.php
View file @
935cf551
@
extends
(
'layouts.frontend'
)
@
section
(
'content'
)
<?php
$detailBannerImage
=
asset
(
'storage/'
.
$pageData
->
banner_image
);
?>
@if(!empty($detailBannerImage))
<
section
class
="
container
-
fluid
hero
-
space
">
<picture>
<source
media=
"(max-width: 767px)"
srcset=
"
<?php
echo
$detailBannerImage
;
?>
"
>
<img
src=
"{{ $detailBannerImage }}"
alt=
"Flowers"
style=
"width:auto;"
>
</picture>
@if(!empty(
$pageData->banner_image
))
<?php
$detailBannerImage
= asset('storage/'.
$pageData->banner_image
); ?>
<picture>
<source media="
(
max
-
width
:
767
px
)
" srcset="
<?
php
echo
$detailBannerImage
;
?>
">
<img
src=
"{{ $detailBannerImage }}"
alt=
"Flowers"
style=
"width:auto;"
>
</picture>
@else
<picture>
<source
media=
"(max-width: 767px)"
srcset=
""
>
<img
src=
"/headmast.png"
alt=
"Flowers"
style=
"width:auto;"
>
</picture>
@endif
</section>
@endif
<section
class=
"container address-box"
>
<section
class=
"address-box_inner"
>
<h2
class=
"title"
>
{{ $locationDetailAPIdata['data']['name'] }}
</h2>
<span
class=
"ratings"
>
<?php
for
(
$i
=
1
;
$i
<=
5
;
$i
++
){
$rating
=
round
(
$locationDetailAPIdata
[
'data'
][
'averageRating'
]);
if
(
$rating
>=
$i
){
echo
'<i class="mdi mdi-star"></i>'
;
}
else
{
echo
'<i class="mdi mdi-star-outline"></i>'
;
}
?>
<?php
}
?>
<span
class=
"counts"
>
{{ $locationDetailAPIdata['data']['averageRating'] }}
</span>
<?php
for
(
$i
=
1
;
$i
<=
5
;
$i
++
){
$rating
=
round
(
$locationDetailAPIdata
[
'data'
][
'averageRating'
]);
if
(
$rating
>=
$i
){
echo
'<i class="mdi mdi-star"></i>'
;
}
else
{
echo
'<i class="mdi mdi-star-outline"></i>'
;
}
?>
<?php
}
?>
<span
class=
"counts"
>
{{ $locationDetailAPIdata['data']['averageRating'] }}
</span>
</span>
<div
class=
"share dropdown"
>
<span
class=
"share-btn"
id=
"address-box_social"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><i
class=
"mdi mdi-share-variant icon-grey"
></i></span>
...
...
@@ -56,6 +62,7 @@
{{ $locationDetailAPIdata['data']['phone'] }}
</p>
</div>
<div
class=
"col-md-4 "
>
@if(!empty($locationDetailAPIdata['data']['regularHours']))
<p
class=
"dropdown d-flex align-items-center"
id=
"address-box_openinghours"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><i
class=
"mdi mdi-clock icon-grey mr-3"
></i>
Open Now
<i
class=
"mdi mdi-chevron-down icon-grey ml-2"
></i></p>
<div
class=
"openinghours dropdown-menu"
aria-labelledby=
"address-box_openinghours"
>
<ul>
...
...
@@ -67,6 +74,7 @@
@endforeach
</ul>
</div>
@endif
</div>
</div>
</section>
...
...
@@ -81,8 +89,7 @@
<div
class=
"content_paragraph"
>
<p>
{{ $locationDetailAPIdata['data']['description'] }}
</p>
</div>
</div>
</div>
</div>
...
...
application/routes/web.php
View file @
935cf551
...
...
@@ -23,6 +23,7 @@ Route::post('reviewpaginate', 'SearchController@reviewpaginate')->name('reviewpa
/* Cron Routes */
Route
::
get
(
'cron/getLocaterListData'
,
'CronController@getLocaterListData'
)
->
name
(
'getLocaterListData'
);
Route
::
get
(
'cron/getCity'
,
'CronController@getCity'
)
->
name
(
'getCity'
);
/** End Cron Routes */
Auth
::
routes
();
...
...
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