Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-product
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
Angel Martin
onestartup-product
Commits
1e46a508
Commit
1e46a508
authored
May 07, 2018
by
Angel MAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
6a975f08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
AdminProductController.php
src/controllers/AdminProductController.php
+10
-2
edit.blade.php
src/views/product/edit.blade.php
+4
-3
No files found.
src/controllers/AdminProductController.php
View file @
1e46a508
...
@@ -184,7 +184,11 @@ class AdminProductController extends Controller
...
@@ -184,7 +184,11 @@ class AdminProductController extends Controller
public
function
deleteImage
(
$id
)
public
function
deleteImage
(
$id
)
{
{
$gallery
=
Gallery
::
find
(
$id
);
$gallery
=
Gallery
::
find
(
$id
);
unlink
(
public_path
()
.
$gallery
->
path
);
if
(
file_exists
(
public_path
()
.
$gallery
->
path
))
{
unlink
(
public_path
()
.
$gallery
->
path
);
}
$gallery
->
delete
();
$gallery
->
delete
();
return
redirect
()
return
redirect
()
...
@@ -196,7 +200,11 @@ class AdminProductController extends Controller
...
@@ -196,7 +200,11 @@ class AdminProductController extends Controller
public
function
deleteCover
(
$id
)
public
function
deleteCover
(
$id
)
{
{
$product
=
Product
::
find
(
$id
);
$product
=
Product
::
find
(
$id
);
unlink
(
public_path
()
.
'/storage/'
.
$product
->
cover
);
if
(
file_exists
(
public_path
()
.
'/storage/'
.
$product
->
cover
))
{
unlink
(
public_path
()
.
'/storage/'
.
$product
->
cover
);
}
$product
->
cover
=
null
;
$product
->
cover
=
null
;
$product
->
save
();
$product
->
save
();
...
...
src/views/product/edit.blade.php
View file @
1e46a508
...
@@ -118,10 +118,11 @@
...
@@ -118,10 +118,11 @@
<script type="text/javascript">
<script type="text/javascript">
Dropzone.options.myDropzone = {
Dropzone.options.myDropzone = {
autoProcessQueue:
fals
e,
autoProcessQueue:
tru
e,
uploadMultiple: true,
uploadMultiple: true,
maxFilezise: 10,
maxFilezise: 30,
maxFiles: 5,
maxFiles: 10,
parallelUploads: 10,
init: function() {
init: function() {
var submitBtn = document.querySelector("#submitFiles");
var submitBtn = document.querySelector("#submitFiles");
...
...
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