Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-product-primer_plano
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
Francisco Salazar
onestartup-product-primer_plano
Commits
8fe2e5d0
Commit
8fe2e5d0
authored
Sep 11, 2018
by
Francisco Salazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redireccion por si 404
parent
f7be49f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
ProductController.php
src/controllers/ProductController.php
+3
-5
No files found.
src/controllers/ProductController.php
View file @
8fe2e5d0
...
...
@@ -36,19 +36,17 @@ class ProductController extends Controller
{
$product
=
Product
::
where
(
'slug'
,
$slug
)
->
first
();
$otros
=
$product
->
category
->
products
()
->
where
(
'active'
,
true
)
->
where
(
"id"
,
"<>"
,
$product
->
id
)
->
inRandomOrder
()
->
take
(
config
(
"product.product-show.otros"
))
->
get
();
$categories
=
Category
::
all
();
if
(
$product
!=
null
)
{
if
(
!
$product
->
active
)
{
return
redirect
(
'inactivo
'
);
return
redirect
()
->
route
(
"main.product"
)
->
with
(
'inactivo'
,
'No esta disponible
'
);
}
}
else
{
return
redirect
(
'no_
existe'
);
return
redirect
(
)
->
route
(
"main.product"
)
->
with
(
'notFound'
,
'No
existe'
);
}
$otros
=
$product
->
category
->
products
()
->
where
(
'active'
,
true
)
->
where
(
"id"
,
"<>"
,
$product
->
id
)
->
inRandomOrder
()
->
take
(
config
(
"product.product-show.otros"
))
->
get
();
return
view
(
'product-public::single'
)
->
with
(
'product'
,
$product
)
...
...
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