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
887b6b5b
Commit
887b6b5b
authored
Aug 09, 2019
by
Arpit Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worked on feed section
parent
483cd5d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
4 deletions
+57
-4
FeedController.php
application/app/Http/Controllers/Admin/FeedController.php
+17
-0
feeds_mng.blade.php
application/resources/views/admin/feeds/feeds_mng.blade.php
+33
-1
web.php
application/routes/web.php
+3
-1
updatedquery.php
application/updatedquery.php
+4
-2
No files found.
application/app/Http/Controllers/Admin/FeedController.php
View file @
887b6b5b
...
...
@@ -231,6 +231,22 @@ class FeedController extends AdminController
return
view
(
'admin.feeds.feed_setting'
);
}
public
function
updateShowFeed
(
Request
$request
){
if
(
$request
->
showFeed
==
'true'
){
$show_feed
=
'1'
;
}
else
{
$show_feed
=
'0'
;
}
$updateShowFeed
=
LocaterFeed
::
where
(
'locater_feeds.id'
,
'='
,
$request
->
id
)
->
update
([
'show_feed'
=>
$show_feed
]);
return
[
'status'
=>
'success'
,
'data'
=>
'done'
];
}
}
\ No newline at end of file
application/resources/views/admin/feeds/feeds_mng.blade.php
View file @
887b6b5b
...
...
@@ -84,7 +84,15 @@
<td>
{
{$row->id}
}
</td>
<td>
{
{$row->feeds_id}
}
</td>
<td>
{
{$row->title}
}
</td>
<td><input type="
checkbox
" data-id=feed_data_<?php echo
$row->feeds_id
; ?> style="
width
:
20
px
;
height
:
20
px
;
" name="
show
"> </td>
<td>
<?php
if(
$row->show_feed
== 1){
$checked
= "
checked
";
}else{
$checked
= "";
} ?>
<input <?php echo
$checked
; ?> type="
checkbox
" class="
showFeed
" data-id=<?php echo
$row->id
; ?> style="
width
:
20
px
;
height
:
20
px
;
" name="
show
">
</td>
<td>{{date("
F
j
,
Y
", strtotime(
$row->created_at
))}}</td>
<td style="
width
:
10
%
">
<a href="
{{
route
(
'admin.feeds.edit'
,[
'id'
=>
$row
->
id
])}}
" class="
btn
btn
-
info
btn
-
xs
action
-
btn
" title ="
Edit
"><span class="
glyphicon
glyphicon
-
pencil
" aria-hidden="
true
"></span></a>
...
...
@@ -117,4 +125,28 @@
</div>
</div>
<script type="
text
/
javascript
">
$("
.
showFeed
").on('click', function () {
var id = $(this).data('id');
var showFeed = $(this).is("
:
checked
");
showFeedData(id,showFeed);
});
function showFeedData(id,showFeed){
$.ajax({
type: 'POST',
url: "
{{
route
(
'admin.feeds.updateShowFeed'
)}}
",
data: {"
_token
": "
{{
csrf_token
()
}}
",id:id,showFeed:showFeed},
success: function (datanew) {
}
});
}
</script>
@endsection
application/routes/web.php
View file @
887b6b5b
...
...
@@ -102,6 +102,8 @@ Route::group(['middleware' => ['auth'], 'prefix' => 'admin', 'namespace' => 'Adm
Route
::
post
(
'feeds/{id}/edit'
,
'FeedController@updateFeed'
)
->
name
(
'admin.feeds.update'
);
Route
::
get
(
'feeds/{id}/delete'
,
'FeedController@deleteFeed'
)
->
name
(
'admin.feeds.delete'
);
Route
::
get
(
'feedSetting'
,
'FeedController@feedSetting'
)
->
name
(
'admin.feedSetting'
);
Route
::
get
(
'feedSetting'
,
'FeedController@feedSetting'
)
->
name
(
'admin.feeds.feedSetting'
);
Route
::
post
(
'updateShowFeed'
,
'FeedController@updateShowFeed'
)
->
name
(
'admin.feeds.updateShowFeed'
);
});
application/updatedquery.php
View file @
887b6b5b
...
...
@@ -4,4 +4,6 @@ RUN on browser : WWW_ROOT./cron/getLocaterListData
RUN
on
browser
:
WWW_ROOT
./
cron
/
getState
RUN
on
browser
:
WWW_ROOT
./
cron
/
getCity
ALTER
TABLE
`homepages`
CHANGE
`other_setting`
`show_feed`
VARCHAR
(
255
)
CHARACTER
SET
latin1
COLLATE
latin1_swedish_ci
NOT
NULL
;
\ No newline at end of file
ALTER
TABLE
`homepages`
CHANGE
`other_setting`
`show_feed`
VARCHAR
(
255
)
CHARACTER
SET
latin1
COLLATE
latin1_swedish_ci
NOT
NULL
;
ALTER
TABLE
`locater_feeds`
ADD
`show_feed`
TINYINT
(
4
)
NOT
NULL
DEFAULT
'0'
AFTER
`id`
;
\ No newline at end of file
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