Skip to content
Open

Dev #36

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
368 commits
Select commit Hold shift + click to select a range
a1f0316
still with the fucking users
Davidsd16 Sep 14, 2021
a1732ca
cards of cart align columns
gbaquerizo13 Sep 15, 2021
d7f688a
fix cancel button in create form
crismouta Sep 15, 2021
c9d68ed
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 15, 2021
e80a5a5
Merge branches 'dev' and 'dev' of https://github.com/ProjectComixSix/…
Sep 15, 2021
f371172
format 2 decimal in cart on price without IVA and IVA
Sep 15, 2021
d240e52
user view task for administrator completed
Davidsd16 Sep 15, 2021
9921fba
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 15, 2021
fb6ec6b
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 15, 2021
6efad3b
Merge pull request #45 from ProjectComixSix/Users
Davidsd16 Sep 15, 2021
a0c7175
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 15, 2021
c6270dc
view cart lg done
gbaquerizo13 Sep 15, 2021
89b7a86
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 15, 2021
44d863a
add d-flex in cards
gbaquerizo13 Sep 15, 2021
b9604a3
not available icon
MAlexGG Sep 15, 2021
e42ac11
Merge pull request #46 from ProjectComixSix/detailsFront
gbaquerizo13 Sep 15, 2021
5f9dc02
act
MAlexGG Sep 15, 2021
81a3ea1
Merge pull request #47 from ProjectComixSix/frontChanges
MAlexGG Sep 15, 2021
8d3c362
cart-title changed
MAlexGG Sep 15, 2021
a5f60ab
create the path to delete a user
Davidsd16 Sep 15, 2021
a5958eb
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 15, 2021
27266e8
cart-title changed
MAlexGG Sep 15, 2021
974607a
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 15, 2021
9d4ce7a
git pull dev
Sep 15, 2021
6ff7e9c
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 15, 2021
27b030b
width fixed icon cart no available
MAlexGG Sep 15, 2021
c91cd2d
prepare to pull
Sep 15, 2021
c60ac55
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 15, 2021
765234f
fix create form adding required field
crismouta Sep 15, 2021
7450005
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 16, 2021
304806a
format cart with 2 decimal
Sep 16, 2021
44081ab
fix mediaqueries card separator
MAlexGG Sep 16, 2021
aca8054
act
MAlexGG Sep 16, 2021
b7da556
add function deleteAllProducts to CartController
crismouta Sep 16, 2021
787090f
act
MAlexGG Sep 16, 2021
e04dd5d
update deleteAllProducts function
crismouta Sep 16, 2021
78851b4
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 16, 2021
df6cec5
Merge pull request #48 from ProjectComixSix/DeleteCart
crismouta Sep 16, 2021
a8e7de8
create test all products can be removed from cart
crismouta Sep 16, 2021
9c9743b
act
MAlexGG Sep 16, 2021
054ae10
add addCart function to show cart button
crismouta Sep 16, 2021
8270302
icoCarrito fixed, margins and paddings Seguir comprando y vaciar carrito
MAlexGG Sep 16, 2021
61e7505
do route delete user
Davidsd16 Sep 16, 2021
f79d9f1
Merge pull request #49 from ProjectComixSix/ShowCartButton
MAlexGG Sep 16, 2021
4479fac
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 16, 2021
64bc298
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 16, 2021
b0832cd
insert the route delete user
Davidsd16 Sep 16, 2021
201b341
create the button delete user and function
Davidsd16 Sep 16, 2021
a18a74d
act
MAlexGG Sep 16, 2021
84a50ad
edit user fields
Davidsd16 Sep 16, 2021
a511d6f
Merge pull request #50 from ProjectComixSix/userProfilesAdmin
MAlexGG Sep 16, 2021
a1b47b1
update dev
Davidsd16 Sep 16, 2021
8024234
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 16, 2021
ca11d7d
create new view for user form
Davidsd16 Sep 16, 2021
f4d6d0c
user list with edit-delete icons
MAlexGG Sep 16, 2021
70b3ce9
create increment a decrement quantity in cart with button and reform …
Sep 16, 2021
f132480
navbar and burger responsive done
gbaquerizo13 Sep 16, 2021
be0a27f
Merge pull request #51 from ProjectComixSix/navbarBurger
gbaquerizo13 Sep 16, 2021
6996762
correct login text
crismouta Sep 16, 2021
429042c
correct login text
crismouta Sep 16, 2021
1adbf5a
fix login text
crismouta Sep 16, 2021
b57f7b5
fix deleteAllProducts message
crismouta Sep 16, 2021
7c263ea
create edit profile view and edit role
Davidsd16 Sep 16, 2021
1d19f3d
change Alex
Davidsd16 Sep 16, 2021
bab4688
create edit profile view and edit role
Davidsd16 Sep 16, 2021
6376e5e
add field canReserve to user table
crismouta Sep 16, 2021
f32130e
fix field canReserve in users view
crismouta Sep 17, 2021
3028dd1
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 17, 2021
11bde68
add profile
crismouta Sep 17, 2021
97f9b80
pull origin dev
Sep 17, 2021
5d179d1
Merge pull request #52 from ProjectComixSix/JMaddDelQuantity
JMgranaBUAB Sep 17, 2021
f549622
completed task of viewing users and editing them
Davidsd16 Sep 17, 2021
5a41b6b
completed task of viewing users and editing them
Davidsd16 Sep 17, 2021
ca25a0f
delete choise value in cart
Sep 17, 2021
131b6d6
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 17, 2021
3c05e97
add profile route to header
crismouta Sep 17, 2021
19d95f8
fix profile route in header
crismouta Sep 17, 2021
56fafde
update dev
crismouta Sep 17, 2021
5dccfe9
completed task of viewing users and editing them
Davidsd16 Sep 17, 2021
988b931
Merge pull request #53 from ProjectComixSix/Users
Davidsd16 Sep 17, 2021
fc451fe
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 17, 2021
a625c4a
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 17, 2021
2e5ba07
Merge pull request #54 from ProjectComixSix/Profile
crismouta Sep 17, 2021
5d5f7bc
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 17, 2021
29744ab
add region to profile form
crismouta Sep 17, 2021
0893f43
fix surname field
crismouta Sep 17, 2021
99c33a6
change profile view
crismouta Sep 17, 2021
ec588db
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 17, 2021
8edd975
fix profile view and routes in web
crismouta Sep 17, 2021
bb16e64
delete category.blade
crismouta Sep 17, 2021
5157773
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 17, 2021
0102fe2
fix delete function in home view
crismouta Sep 18, 2021
a843397
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 18, 2021
0b69ff9
create paginate in all categories
Davidsd16 Sep 18, 2021
01dbd0f
add test increment product in cart
Sep 19, 2021
509891f
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 19, 2021
052a15d
add search route test
crismouta Sep 19, 2021
deaa56b
add admin and user tests + middleware isadmin to getUser route
crismouta Sep 19, 2021
47eb330
reserva button only appears to user and product than can reserve is true
crismouta Sep 19, 2021
b4b5e4f
add js function to edit form images
crismouta Sep 20, 2021
d58b8ac
Merge pull request #55 from ProjectComixSix/UserCanReserve
crismouta Sep 20, 2021
616533f
change route redirect of incrementProductInCart
Sep 20, 2021
9e89be8
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 20, 2021
2dc30c8
act
MAlexGG Sep 20, 2021
c64bbf3
user profile design and fix input in edit profile
MAlexGG Sep 20, 2021
1574e28
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 20, 2021
2de24d0
Merge pull request #56 from ProjectComixSix/AlexFront
MAlexGG Sep 20, 2021
3483a61
atribution icons in user profile
MAlexGG Sep 20, 2021
63ab32e
fix input type ratio to retrive info in edit Product and User forms
crismouta Sep 20, 2021
617fe0b
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
a83dc6c
test sum and test quantity in cart
Sep 20, 2021
a363480
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 20, 2021
7aac2c7
responsive navbar
MAlexGG Sep 20, 2021
4d82905
Merge pull request #57 from ProjectComixSix/AlexFront
MAlexGG Sep 20, 2021
576aba3
cart icon responsive table fixed
MAlexGG Sep 20, 2021
7d29af4
trying tix search test
crismouta Sep 20, 2021
a9aeef5
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
9dba983
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
b536541
update dev
crismouta Sep 20, 2021
c7bcb26
mediaqueries iconos cart
MAlexGG Sep 20, 2021
e853ca5
font family categorias
MAlexGG Sep 20, 2021
797e389
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
1d9f0f8
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
b652ca5
prepare for new branch
Sep 20, 2021
e7f7e2d
refactoring search test
crismouta Sep 20, 2021
e9106f8
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
0072651
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
01e934d
cart quantity design
MAlexGG Sep 20, 2021
f7e2678
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 20, 2021
feb4f53
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
b8b5a86
cheked box reserve and avaliable in edit and create
gbaquerizo13 Sep 20, 2021
0d357b9
git push origin dev
Sep 20, 2021
2ca706e
Merge pull request #58 from ProjectComixSix/JMsearchProfile
JMgranaBUAB Sep 20, 2021
9988891
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
7822d3c
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
56cc793
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 20, 2021
126f747
Merge pull request #59 from ProjectComixSix/EditForm
crismouta Sep 20, 2021
2d26cdc
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 20, 2021
85d6643
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 20, 2021
625dbda
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 20, 2021
f82043b
add number_format in cart
Sep 20, 2021
f772f79
act
MAlexGG Sep 20, 2021
94cd9d3
responsive cart
MAlexGG Sep 20, 2021
3df75bf
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 21, 2021
1a6002c
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 21, 2021
2f68455
Merge pull request #61 from ProjectComixSix/Paginate
Davidsd16 Sep 21, 2021
8c40a76
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 21, 2021
7f20312
update dev
crismouta Sep 21, 2021
e51d020
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 21, 2021
4f0b224
not available in seeders
MAlexGG Sep 21, 2021
2e3e8f0
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 21, 2021
3cd0a9c
act
MAlexGG Sep 21, 2021
44ca269
create 30 products per page
Davidsd16 Sep 21, 2021
ecd396b
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Davidsd16 Sep 21, 2021
f940527
fix search test + delete function delete updated image
crismouta Sep 21, 2021
76ac733
fix conflicts in search view
crismouta Sep 21, 2021
ccdfa76
card in show products relations with no available
MAlexGG Sep 21, 2021
eefb0ef
responsive in formato, paginas, etiquetas
MAlexGG Sep 21, 2021
778bbaf
paginator customized
MAlexGG Sep 21, 2021
f8e7226
header responsive
MAlexGG Sep 21, 2021
b1abe62
Merge pull request #62 from ProjectComixSix/AlexAdminView
MAlexGG Sep 21, 2021
dd80824
search user in model
Sep 21, 2021
7b09000
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 21, 2021
91f3e3d
delete search test
crismouta Sep 21, 2021
3e4f01c
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 21, 2021
bad8e0f
add user can not see users list test
crismouta Sep 21, 2021
63b5b24
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 21, 2021
7e93119
update search function
crismouta Sep 21, 2021
eab377b
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 21, 2021
a6f4267
c
MAlexGG Sep 21, 2021
96e9ed3
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 21, 2021
c074b3c
clean controllers and models
Sep 21, 2021
de9d2b6
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 21, 2021
3274442
update store function
crismouta Sep 21, 2021
c746639
act
MAlexGG Sep 21, 2021
1b76851
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 21, 2021
7560d58
create buttons admin
MAlexGG Sep 21, 2021
67c7be6
prepare to pull
Sep 21, 2021
160778c
prepare to pull
Sep 21, 2021
99741d5
update store function
crismouta Sep 21, 2021
ff1841d
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 21, 2021
2583cbd
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 22, 2021
0157101
clean line in all controllers
Sep 22, 2021
f42224a
create products and edit users admin
MAlexGG Sep 22, 2021
bad7da0
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 22, 2021
4eb0123
apellidos
MAlexGG Sep 22, 2021
434f9d6
update dev
crismouta Sep 22, 2021
fd213d6
clean models and tets
Sep 22, 2021
c54d102
add purchase blade and purchase routes
crismouta Sep 22, 2021
a6edd3c
add favicon
Sep 22, 2021
ad4220d
create private function storeImages
crismouta Sep 22, 2021
a861abf
Merge pull request #63 from ProjectComixSix/refactoringImages
crismouta Sep 22, 2021
3f26d9d
add payment controller + functions
crismouta Sep 22, 2021
0b430f4
update payment controller
crismouta Sep 22, 2021
182e036
add try/catch to charge funtion
crismouta Sep 22, 2021
f529c17
add footer link of location
gbaquerizo13 Sep 22, 2021
09941fe
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
gbaquerizo13 Sep 22, 2021
41840e7
delete style in header
gbaquerizo13 Sep 22, 2021
d986828
Merge pull request #66 from ProjectComixSix/title_search
gbaquerizo13 Sep 22, 2021
8320863
add purchase route to cart resume
crismouta Sep 23, 2021
f83acbd
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 23, 2021
328a2b3
view new password
MAlexGG Sep 23, 2021
ed5dc85
view new password label
MAlexGG Sep 23, 2021
ece6f99
update dev
crismouta Sep 23, 2021
0047bfe
change branch
crismouta Sep 26, 2021
8231b25
fix can reserve and add clock icon
crismouta Sep 26, 2021
e549e6e
change edit and delete buttons in show view
crismouta Sep 26, 2021
f3712f8
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 26, 2021
706df11
update purchase form
crismouta Sep 26, 2021
cb3eaa6
review dev to merge
crismouta Sep 26, 2021
1826730
buttons edit and delete in admin show
MAlexGG Sep 27, 2021
4a702bd
location icon
MAlexGG Sep 27, 2021
9793081
delete conditional to not show navbar to admin
crismouta Sep 27, 2021
7e99b01
alt dinamic in all images
MAlexGG Sep 27, 2021
c520361
alt dinamic in all images fixed
MAlexGG Sep 27, 2021
b01e356
alt dinamic in all images in small images of show page
MAlexGG Sep 27, 2021
1058d2c
edit and delete buttons in search blade
MAlexGG Sep 27, 2021
fcd1328
update branch from dev
crismouta Sep 27, 2021
11b405c
rename ProductCartTest
crismouta Sep 27, 2021
c07a6b2
conditionals images
MAlexGG Sep 27, 2021
33553cb
contraportada and pages included in seeder
MAlexGG Sep 27, 2021
c3dce0d
update readme.md
Sep 27, 2021
1af1b5c
update readme.md
Sep 27, 2021
edca5f7
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 27, 2021
ca4901f
and verified user for admin
Sep 27, 2021
438cc25
Merge pull request #67 from ProjectComixSix/JMcheckuser
JMgranaBUAB Sep 27, 2021
91062e3
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
crismouta Sep 27, 2021
6a06af9
add variable to PaymentController
crismouta Sep 27, 2021
0f8aff3
Merge pull request #68 from ProjectComixSix/ImplementStripe
crismouta Sep 27, 2021
8b0b3f6
delete one test from registrationTest
crismouta Sep 27, 2021
9a87a05
Update README.md
crismouta Sep 27, 2021
d3604c2
Update README.md
crismouta Sep 27, 2021
3cbccdd
Update README.md
crismouta Sep 27, 2021
0007fae
test user_not_verified
Sep 27, 2021
0b0b635
refactor test
Sep 27, 2021
a84d0ab
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
Sep 27, 2021
6f51a0a
Update README.md
crismouta Sep 28, 2021
5713a29
act
MAlexGG Sep 28, 2021
6d4c8df
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 28, 2021
ce1d5e5
change macbeth and komi-san to can not reserve and user1 to can reser…
crismouta Sep 28, 2021
9e52731
add paginaite in filter by author and filter by tag
Sep 28, 2021
5652621
spaces in format
MAlexGG Sep 28, 2021
29a4b7f
fixed front purchase blade
MAlexGG Sep 28, 2021
d6715e5
Update README.md
crismouta Sep 28, 2021
ab67edc
Update README.md
crismouta Sep 28, 2021
d871031
front purchase view
MAlexGG Sep 28, 2021
3c31471
Merge branch 'dev' of https://github.com/ProjectComixSix/HangarRebeld…
MAlexGG Sep 28, 2021
c39d1c8
table mediaqueries fixed and sass components _ fixed
MAlexGG Sep 28, 2021
5a2dca7
minimun error in sass file _
MAlexGG Sep 28, 2021
080a917
Update laravel.yml
JMgranaBUAB Sep 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:KVYFvT/ZC69b0qIWSNdctvacWA7p9CbhTVqMgzKp2o4=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=lhcp3212.webapps.net
DB_PORT=3306
DB_DATABASE=cp1hsb5c_hangarrebelde
DB_USERNAME=cp1hsb5c_rebelde
DB_PASSWORD=HangarRebelde

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
4 changes: 2 additions & 2 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Laravel
on:
push:
branches:
- master
- main
- dev
pull_request:
branches:
- master
- main
- dev

jobs:
Expand Down
Binary file modified README.md
Binary file not shown.
11 changes: 11 additions & 0 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,19 @@ protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'surname' => $data['surname'],
'dni' => $data['dni'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'membership_number' => $data['membership_number'],
'phone1' => $data['phone1'],
'phone2' => $data['phone2'],
'address' => $data['address'],
'zipCode' => $data['zipCode'],
'city' => $data['city'],
'region' => $data['region'],
'country' => $data['country'],

]);
}
}
75 changes: 64 additions & 11 deletions app/Http/Controllers/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

namespace App\Http\Controllers;

use App\Models\Product;
use App\Models\Cart;
use App\Models\User;
use App\Models\Product;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;

class CartController extends Controller
{
Expand All @@ -18,30 +20,81 @@ public function getCart()
->join('carts', 'products.id', '=', 'carts.product_id')
->where('user_id', '=', $user_id)
->get();

return view('cart', compact('products'));
$sumAndQuantity = Cart::sumAndQuantity();
return view('cart', compact('products', 'sumAndQuantity'));
}

public function addCart($product_id)
{
$user = Auth::user();
//dd($user);
$product = Product::find($product_id);

if ($product->isAvailible()) {
$this->addProductInCart($product);
} else {
session()->flash('message', '¡Este producto no está disponible!');
}

return redirect()->route('getCart');
}

public function removeCart($product_id)
{
$user = Auth::user();
$product = Product::find($product_id);
$user->productsCarts()->detach($product);
return redirect()->route('getCart');
}

public function incrementProductInCart($product_id)
{
$user = Auth::user();
$user_id = $user->id;

//$product->userCarts()->attach($user);
$user->productsCarts()->attach($product);
DB::table('carts')
->where('user_id', $user_id)
->where('product_id', $product_id)
->increment('quantity', 1);

return redirect()->route('getCart');
}

public function deleteCart($product_id)
public function decrementProductInCart($product_id, $quantity)
{
$user = Auth::user();
//dd($user);
$user_id = $user->id;
if ($quantity > 1) {
DB::table('carts')
->where('user_id', $user_id)
->where('product_id', $product_id)
->decrement('quantity', 1);
}

$product = Product::find($product_id);
return redirect()->route('getCart');
}

public function deleteAllProducts()
{
Cart::deleteAllProductsInCart();
Session::flash('message', "¡No hay productos en su carrito de compra!");
return back();
}

private function addProductInCart($product)
{
$user = Auth::user();
$user_id = $user->id;

$products = DB::table('products')
->join('carts', 'products.id', '=', 'carts.product_id')
->where('user_id', '=', $user_id)
->where('product_id', '=', $product->id)
->get();

$product->userCarts()->detach($user);
if ($products->count() === 0) {
$user->productsCarts()->attach($product);
}

$this->incrementProductInCart($product->id);
return redirect()->route('getCart');
}
}
10 changes: 0 additions & 10 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@

class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}

/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index()
{
return view('home');
Expand Down
52 changes: 52 additions & 0 deletions app/Http/Controllers/PaymentController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

namespace App\Http\Controllers;

use Stripe\Charge;
use Stripe\Stripe;
use App\Models\Cart;
use App\Models\User;
use Illuminate\Http\Request;
use PHPUnit\Framework\Exception;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;

class PaymentController extends Controller
{
public function order()
{
$user = Auth::user();
$user_id = $user->id;
$products = DB::table('products')
->join('carts', 'products.id', '=', 'carts.product_id')
->where('user_id', '=', $user_id)
->get();
$sumAndQuantity = Cart::sumAndQuantity();
return view('purchase', compact('products', 'sumAndQuantity'));
}

public function purchase($amount)
{
$this->charge($amount);
Cart::deleteAllProductsInCart();
return redirect()->route('getCart')
->with('message' , '¡Compra realizada con éxito, muchas gracias!');
}

private function charge($amount)
{
$token = $_POST['stripeToken'];
try {
Stripe::setApiKey(env('STRIPE_SECRET'));
Charge::create ([
"amount" => $amount,
"currency" => "eur",
"source" => $token,
"description" => 'Pago en Hangar Rebelde'
]);
}
catch (Exception $e) {
$e->getMessage(["Oh no, ha habido un error!"]);
}
}
}
Loading