Compare commits
310 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4358d071b3 | ||
![]() |
e7aad7ee6c | ||
![]() |
6623f957a1 | ||
![]() |
335951b7e6 | ||
![]() |
9299eac552 | ||
![]() |
aed5b9d16e | ||
![]() |
2d6f6f6848 | ||
![]() |
36626f2d76 | ||
![]() |
9fab5451f5 | ||
![]() |
79670657a4 | ||
![]() |
441d89767d | ||
![]() |
43ea446b2a | ||
![]() |
63692b557c | ||
![]() |
31b303b9fd | ||
![]() |
0c067e26c8 | ||
![]() |
3810b487cd | ||
![]() |
d9a41840ce | ||
![]() |
f52c93c925 | ||
![]() |
cfe5086b10 | ||
![]() |
87dc97c8ea | ||
![]() |
023772d929 | ||
![]() |
f49137b833 | ||
![]() |
d6fe858e84 | ||
![]() |
15f03c0527 | ||
![]() |
51d340d95b | ||
![]() |
8cda91a6e6 | ||
![]() |
b99d6a51a6 | ||
![]() |
15ee059d30 | ||
![]() |
821d85e395 | ||
![]() |
be1344f63e | ||
![]() |
20bd030e78 | ||
![]() |
59cb5eab67 | ||
![]() |
6dac81e809 | ||
![]() |
1bb34caaa7 | ||
![]() |
c3aff98094 | ||
![]() |
0408b391da | ||
![]() |
b20a2d24e4 | ||
![]() |
3949529c32 | ||
![]() |
482c613ca6 | ||
![]() |
8ff3f04c0b | ||
![]() |
9ddb44c3dc | ||
![]() |
ca3643deef | ||
![]() |
b636ea0554 | ||
![]() |
f68b1cc8ca | ||
![]() |
91476d2701 | ||
![]() |
44948226bb | ||
![]() |
5b8f12fa94 | ||
![]() |
18d4962ef9 | ||
![]() |
307f3229d2 | ||
![]() |
ce544019eb | ||
![]() |
1784358fc2 | ||
![]() |
6497f6bf90 | ||
![]() |
b4e1b5aeca | ||
![]() |
ffba7ebf1b | ||
![]() |
761d044957 | ||
![]() |
307aaee082 | ||
![]() |
b1f6528605 | ||
![]() |
388d0eafa0 | ||
![]() |
f7ab52fec1 | ||
![]() |
f63d8080a3 | ||
![]() |
470bc6d545 | ||
![]() |
bc34bb5fa0 | ||
![]() |
1d9ac19c16 | ||
![]() |
ef1ec46bad | ||
![]() |
efd61fb376 | ||
![]() |
299d8b637a | ||
![]() |
086f685780 | ||
![]() |
4d97c1473b | ||
![]() |
63c435c610 | ||
![]() |
08e09c5d08 | ||
![]() |
a9b7531ab1 | ||
![]() |
224900890b | ||
![]() |
4800a79643 | ||
![]() |
c776da96ae | ||
![]() |
0eb84f5f76 | ||
![]() |
bb0243df47 | ||
![]() |
3dd26b8259 | ||
![]() |
fc2119ad5a | ||
![]() |
fe535c061e | ||
![]() |
75a8db833b | ||
![]() |
11a12bb48b | ||
![]() |
5b44df24ab | ||
![]() |
c95cde5cde | ||
![]() |
59ed6e51c1 | ||
![]() |
06bfaf709c | ||
![]() |
5f422e1b83 | ||
![]() |
7701671c7e | ||
![]() |
0ec3660e1a | ||
![]() |
f17f5da822 | ||
![]() |
ca3e31580f | ||
![]() |
4509b11816 | ||
![]() |
7fb7c23fb0 | ||
![]() |
4a5a002dc1 | ||
![]() |
3b893e7ccf | ||
![]() |
1d2e2ebdc7 | ||
![]() |
f70f82f896 | ||
![]() |
ba75d09cbf | ||
![]() |
44dee3929b | ||
![]() |
36b7842085 | ||
![]() |
ad9e33d0d7 | ||
![]() |
4ae54d736f | ||
![]() |
d7ed67a842 | ||
![]() |
d7a36c61b2 | ||
![]() |
3cba1c60f8 | ||
![]() |
1a8f883b63 | ||
![]() |
3ea5b4e010 | ||
![]() |
322bfed972 | ||
![]() |
a5b48c4730 | ||
![]() |
869bd1e0ef | ||
![]() |
a16c76940f | ||
![]() |
d382ca1613 | ||
![]() |
6cf1cc0fe9 | ||
![]() |
de911a0e3e | ||
![]() |
84f94ed564 | ||
![]() |
a6a729a065 | ||
![]() |
9124b2ddbd | ||
![]() |
d10df843cb | ||
![]() |
f2a714cece | ||
![]() |
d6573b9bfd | ||
![]() |
415a7ed2da | ||
![]() |
2073aa632d | ||
![]() |
825b27df57 | ||
![]() |
336b0c9799 | ||
![]() |
d48c1af824 | ||
![]() |
8c9c70ef3f | ||
![]() |
201aff6c0a | ||
![]() |
309cfa0514 | ||
![]() |
c39d6b18b2 | ||
![]() |
d9d776e5da | ||
![]() |
7f8017de76 | ||
![]() |
c3420b1684 | ||
![]() |
20f0e1dfc2 | ||
![]() |
ac5fa6c25c | ||
![]() |
1011e2dcc4 | ||
![]() |
b2d73eeda0 | ||
![]() |
25b2d06572 | ||
![]() |
3b1b6e9b7e | ||
![]() |
e9fec445ff | ||
![]() |
a9619be8d0 | ||
![]() |
f1a3126758 | ||
![]() |
49904b22bf | ||
![]() |
fc49c6490f | ||
![]() |
f00f5addfe | ||
![]() |
9cd25034fc | ||
![]() |
8935dd6482 | ||
![]() |
da4693b310 | ||
![]() |
302ef9227a | ||
![]() |
411441e1a8 | ||
![]() |
cfd370eb6d | ||
![]() |
1d2548a174 | ||
![]() |
16ca760901 | ||
![]() |
636d4e259e | ||
![]() |
5305ae7803 | ||
![]() |
8e212889a4 | ||
![]() |
1086dd85a4 | ||
![]() |
ca0fae7bdb | ||
![]() |
2229586b58 | ||
![]() |
c8e82ca57b | ||
![]() |
fc575a9554 | ||
![]() |
485aeedbf1 | ||
![]() |
24f1319007 | ||
![]() |
82887c013b | ||
![]() |
aefa5ba1c8 | ||
![]() |
17ab473576 | ||
![]() |
459069c5ee | ||
![]() |
d905171fcb | ||
![]() |
a0268f1c47 | ||
![]() |
b25ce96efb | ||
![]() |
e78bd37da0 | ||
![]() |
371a37df7a | ||
![]() |
af5d28e2a5 | ||
![]() |
8c2289ed74 | ||
![]() |
60359a19ba | ||
![]() |
faf9950562 | ||
![]() |
040bcf2fa0 | ||
![]() |
495981cb5a | ||
![]() |
128015f0fa | ||
![]() |
d491271e7a | ||
![]() |
1e9c6c5838 | ||
![]() |
b8946d8666 | ||
![]() |
a4c2fa2bc9 | ||
![]() |
fbdb3f12a1 | ||
![]() |
01fc633303 | ||
![]() |
8da3e8cb67 | ||
![]() |
bb6d99cb74 | ||
![]() |
f6c8eecb87 | ||
![]() |
f1de845554 | ||
![]() |
308d1775bf | ||
![]() |
ef5c063b09 | ||
![]() |
29e9ed6e4a | ||
![]() |
33cc108900 | ||
![]() |
0b173fb428 | ||
![]() |
9b193c74dd | ||
![]() |
663e2370a2 | ||
![]() |
b7a765bd8c | ||
![]() |
f79d7d5380 | ||
![]() |
6b45719e79 | ||
![]() |
fd6e8bd51e | ||
![]() |
704548343b | ||
![]() |
4657b3419b | ||
![]() |
3522dfe4c7 | ||
![]() |
7283f6e887 | ||
![]() |
1d2e453fc2 | ||
![]() |
e8efc743b2 | ||
![]() |
a5e276d50e | ||
![]() |
0ffb7ccb65 | ||
![]() |
9d383600bc | ||
![]() |
62358aec4e | ||
![]() |
c1a2c34a06 | ||
![]() |
aedf7c9a22 | ||
![]() |
58917d0b3e | ||
![]() |
9420231b58 | ||
![]() |
bd11bd2657 | ||
![]() |
e6a545309f | ||
![]() |
630ebc6b88 | ||
![]() |
036fe6f47f | ||
![]() |
f9735bdd35 | ||
![]() |
57577c95b4 | ||
![]() |
4351c8b678 | ||
![]() |
985a4e94cb | ||
![]() |
bcd69b4582 | ||
![]() |
e180704dd1 | ||
![]() |
4b3ee928ff | ||
![]() |
c8c3bff636 | ||
![]() |
a7ef7eb17d | ||
![]() |
eeed88aba8 | ||
![]() |
e90479e452 | ||
![]() |
826be5ce5b | ||
![]() |
d7ca83ef97 | ||
![]() |
4449353f3a | ||
![]() |
a077092631 | ||
![]() |
ff2d0b794e | ||
![]() |
cfdfaf2fb1 | ||
![]() |
d75fe2f428 | ||
![]() |
8fa42c9f30 | ||
![]() |
e1dbbb21ee | ||
![]() |
65f777baae | ||
![]() |
9cd65a3f02 | ||
![]() |
7cdf9c6c93 | ||
![]() |
360a70f3d8 | ||
![]() |
119a7fdebb | ||
![]() |
6263f163f9 | ||
![]() |
5ae631ee4f | ||
![]() |
9f165580e5 | ||
![]() |
218ce1c785 | ||
![]() |
fd8dbb10a5 | ||
![]() |
2c16379ec1 | ||
![]() |
a4695681b5 | ||
![]() |
2c041bbe14 | ||
![]() |
0919202599 | ||
![]() |
ca26da77c7 | ||
![]() |
bc2d5088c5 | ||
![]() |
8b4477bc8d | ||
![]() |
64a241c1f9 | ||
![]() |
fb8138a69d | ||
![]() |
e2c07edd7d | ||
![]() |
6455cb371f | ||
![]() |
7de05a841f | ||
![]() |
0cfa02b4ce | ||
![]() |
de1c2e7b57 | ||
![]() |
d8dcad4991 | ||
![]() |
b343134c01 | ||
![]() |
fbc9b53b6c | ||
![]() |
93e39165c2 | ||
![]() |
f923eef868 | ||
![]() |
0547066b30 | ||
![]() |
573106ae65 | ||
![]() |
9bbdbfecfb | ||
![]() |
b2efd238c4 | ||
![]() |
ba3f03c7ce | ||
![]() |
ec1ce2df83 | ||
![]() |
d06f7e4933 | ||
![]() |
1644ae706a | ||
![]() |
7d65dcc7ef | ||
![]() |
3f02e0077c | ||
![]() |
771d013087 | ||
![]() |
843f66575f | ||
![]() |
56f819b905 | ||
![]() |
7ae7ad92f8 | ||
![]() |
9f6c8dc21d | ||
![]() |
c0beaeb2b0 | ||
![]() |
b26ebb3150 | ||
![]() |
329079567e | ||
![]() |
0042c3bbe4 | ||
![]() |
6b848b1446 | ||
![]() |
8eb92ef7c6 | ||
![]() |
8fe523cacf | ||
![]() |
8745591f97 | ||
![]() |
a3ba6257ba | ||
![]() |
a9c0df015c | ||
![]() |
f74c188d5b | ||
![]() |
195eeb06b6 | ||
![]() |
9260b967b3 | ||
![]() |
ec63b6e58e | ||
![]() |
7835392d95 | ||
![]() |
265a35a903 | ||
![]() |
e51f2aaf61 | ||
![]() |
977d2ddd18 | ||
![]() |
48b163fd6c | ||
![]() |
5fd58514b5 | ||
![]() |
e5dd05e701 | ||
![]() |
2dbe7268e4 | ||
![]() |
49291de381 | ||
![]() |
89bfa9c9d8 | ||
![]() |
afd595c965 | ||
![]() |
6d46f8a6cc | ||
![]() |
8cbbcc66be | ||
![]() |
822b4393c3 | ||
![]() |
4c20cb8969 | ||
![]() |
417f944b4d |
90 changed files with 4284 additions and 23873 deletions
|
@ -1,5 +1,5 @@
|
|||
### --- App Settings --- ###
|
||||
APP_NAME=Controlpanel.gg
|
||||
APP_NAME=Ctrlpanel.gg
|
||||
APP_ENV=production
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
|
|
38
.github/ISSUE_TEMPLATE/---bug-report.md
vendored
38
.github/ISSUE_TEMPLATE/---bug-report.md
vendored
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
name: "\U0001F41B Bug report"
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: RamonRobben, AVMG20
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug 🐛**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
31
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
31
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
name: "\U0001F680 Feature request"
|
||||
about: Suggest a feature or idea for this project
|
||||
title: "[feature] "
|
||||
labels: enhancement
|
||||
assignees: RamonRobben, AVMG20
|
||||
|
||||
---
|
||||
|
||||
# 🚀 Feature Request
|
||||
|
||||
### Is your proposal related to a problem?
|
||||
|
||||
*Provide a clear and concise description of what the problem is.
|
||||
For example, "I can't change x and it makes me have to do manual work"*
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
### Describe the solution you'd like
|
||||
|
||||
*Provide a clear and concise description of what you want to happen.
|
||||
For Example, "Automate the changing of x so I don't have to do it manually"*
|
||||
|
||||
(Describe your proposed solution here.)
|
||||
|
||||
### Additional context
|
||||
|
||||
*Is there anything else you can add about the proposal?
|
||||
You might want to link to related issues here, if you haven't already.*
|
||||
|
||||
(Write your answer here.)
|
43
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
43
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: "\U0001F41B Bug report"
|
||||
description: Create a report to help us improve
|
||||
title: "[Bug]: "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What is your request about?
|
||||
description: |
|
||||
Provide a clear description of what the problem is.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Branch
|
||||
description: What branch are you on?
|
||||
multiple: false
|
||||
options:
|
||||
- "main"
|
||||
- "development"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Solution idea
|
||||
description: |
|
||||
Provide a clear description of how you want this bug to be fixed (Optional)
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: ctrlpanel-logs
|
||||
attributes:
|
||||
label: Ctrlpanel Logs
|
||||
description: Please copy and paste your laravel-log output. You may also provide a link to it using the following command `tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99`
|
||||
render: Shell
|
||||
- type: textarea
|
||||
id: additional-info
|
||||
attributes:
|
||||
label: Additional Info
|
||||
description: Anything else that could be used to narrow down the issue, like your config.
|
24
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: "\U0001F680 Feature request"
|
||||
description: Suggest a feature or idea for this project
|
||||
title: "[Feature] "
|
||||
labels: ["feature"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: Feature Description
|
||||
description: Provide a clear description of what your idea is all about, what it tries to solve and why it should be implemented.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Solution Idea
|
||||
description: Provide a clear description how the idea should be implemented and why.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional-info
|
||||
attributes:
|
||||
label: Additional Info
|
||||
description: Anything else that could be used to implement your idea.
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 ControlPanel.gg
|
||||
Copyright (c) 2021 CtrlPanel.gg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
42
README.md
42
README.md
|
@ -3,6 +3,7 @@
|
|||
- PayPal Integration
|
||||
- Stripe Integration
|
||||
- Referral System
|
||||
- Partner System
|
||||
- Ticket System
|
||||
- Upgrade/Downgrade Server Resources
|
||||
- Store (credit system with hourly billing and invoices)
|
||||
|
@ -12,46 +13,55 @@
|
|||
- User/Server Management
|
||||
- Customisable server plans
|
||||
- Vouchers
|
||||
- Alert System
|
||||
- Theme Support
|
||||
- and so much more!
|
||||
|
||||
# ControlPanel-gg
|
||||
# CtrlPanel-gg
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||

|
||||

|
||||
   [](https://crowdin.com/project/controlpanelgg)   
|
||||

|
||||

|
||||
   [](https://crowdin.com/project/controlpanelgg)   
|
||||
## About
|
||||
|
||||
ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
|
||||
CtrlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
|
||||
|
||||
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customization options and added discord 0auth verification to offer a solid link between your discord server and your dashboard. You can check our Demo here ([Demo](https://demo.controlpanel.gg "Demo"))
|
||||
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.ctrlpanel.gg "Demo").
|
||||
|
||||
### [Installation](https://controlpanel.gg/docs/intro "Installation")
|
||||
### [Installation](https://ctrlpanel.gg/docs/intro "Installation")
|
||||
|
||||
### [Updating](https://controlpanel.gg/docs/Installation/updating "Updating")
|
||||
### [Updating](https://ctrlpanel.gg/docs/Installation/updating "Updating")
|
||||
|
||||
### [Discord](https://discord.gg/4Y6HjD2uyU "discord")
|
||||
### [Discord](https://discord.gg/4Y6HjD2uyU "Discord")
|
||||
|
||||
### [Contributing](https://controlpanel.gg/docs/Contributing/contributing "Contributing")
|
||||
### [Contributing](https://ctrlpanel.gg/docs/Contributing/contributing "Contributing")
|
||||
|
||||
### [Donating](https://controlpanel.gg/docs/Contributing/donating "Donating")
|
||||
### [Donating](https://ctrlpanel.gg/docs/Contributing/donating "Donating")
|
||||
|
||||
|
||||
|
||||
# Preview
|
||||
|
||||
### Server Creation
|
||||

|
||||

|
||||
|
||||
### Overview
|
||||

|
||||

|
||||
|
||||
### Example server products
|
||||

|
||||

|
||||
|
||||
### Ticket System
|
||||

|
||||

|
||||
|
||||
### Voucher System
|
||||

|
||||
|
||||
### Partner System
|
||||

|
||||
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ class System
|
|||
'pterodactyl-admin-api-key' => 'required|string',
|
||||
'enable-upgrades' => 'string',
|
||||
'enable-disable-servers' => 'string',
|
||||
'enable-disable-new-users' => 'string',
|
||||
'show-imprint' => 'string',
|
||||
'show-privacy' => 'string',
|
||||
'show-tos' => 'string',
|
||||
|
|
|
@ -67,7 +67,7 @@ class ChargeCreditsCommand extends Command
|
|||
$server->suspend();
|
||||
|
||||
//add user to notify list
|
||||
if (! in_array($user, $this->usersToNotify)) {
|
||||
if (!in_array($user, $this->usersToNotify)) {
|
||||
array_push($this->usersToNotify, $user);
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
|
@ -85,7 +85,7 @@ class ChargeCreditsCommand extends Command
|
|||
*/
|
||||
public function notifyUsers()
|
||||
{
|
||||
if (! empty($this->usersToNotify)) {
|
||||
if (!empty($this->usersToNotify)) {
|
||||
/** @var User $user */
|
||||
foreach ($this->usersToNotify as $user) {
|
||||
$this->line("<fg=yellow>Notified user:</> <fg=blue>{$user->name}</>");
|
||||
|
|
42
app/Console/Commands/CleanupOpenPayments.php
Normal file
42
app/Console/Commands/CleanupOpenPayments.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Payment;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class CleanupOpenPayments extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'payments:open:clear';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Clears all payments from the database that have state "open"';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// delete all payments that have state "open" and are older than 1 hour
|
||||
try {
|
||||
Payment::where('status', 'open')->where('updated_at', '<', now()->subHour())->delete();
|
||||
} catch (\Exception $e) {
|
||||
$this->error('Could not delete payments: ' . $e->getMessage());
|
||||
return 1;
|
||||
}
|
||||
|
||||
$this->info('Successfully deleted all open payments');
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ class GetGithubVersion extends Command
|
|||
public function handle()
|
||||
{
|
||||
try{
|
||||
$latestVersion = Http::get('https://api.github.com/repos/controlpanel-gg/dashboard/tags')->json()[0]['name'];
|
||||
$latestVersion = Http::get('https://api.github.com/repos/ctrlpanel-gg/panel/tags')->json()[0]['name'];
|
||||
Storage::disk('local')->put('latestVersion', $latestVersion);
|
||||
} catch (Exception $e) {
|
||||
Storage::disk('local')->put('latestVersion', "unknown");
|
||||
|
|
|
@ -4,12 +4,16 @@ namespace App\Console\Commands;
|
|||
|
||||
use App\Classes\Pterodactyl;
|
||||
use App\Models\User;
|
||||
use App\Traits\Referral;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class MakeUserCommand extends Command
|
||||
{
|
||||
use Referral;
|
||||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
|
@ -37,6 +41,7 @@ class MakeUserCommand extends Command
|
|||
$this->pterodactyl = $pterodactyl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -78,12 +83,12 @@ class MakeUserCommand extends Command
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
$user = User::create([
|
||||
'name' => $response['first_name'],
|
||||
'email' => $response['email'],
|
||||
'role' => 'admin',
|
||||
'password' => Hash::make($password),
|
||||
'referral_code' => $this->createReferralCode(),
|
||||
'pterodactyl_id' => $response['id'],
|
||||
]);
|
||||
|
||||
|
@ -93,6 +98,7 @@ class MakeUserCommand extends Command
|
|||
['Username', $user->name],
|
||||
['Ptero-ID', $user->pterodactyl_id],
|
||||
['Admin', $user->role],
|
||||
['Referral code', $user->referral_code],
|
||||
]);
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -18,10 +18,11 @@ class Kernel extends ConsoleKernel
|
|||
{
|
||||
$schedule->command('credits:charge')->hourly();
|
||||
$schedule->command('cp:versioncheck:get')->daily();
|
||||
$schedule->command('payments:open:clear')->daily();
|
||||
|
||||
//log cronjob activity
|
||||
$schedule->call(function () {
|
||||
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - '.now());
|
||||
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - ' . now());
|
||||
})->everyMinute();
|
||||
}
|
||||
|
||||
|
@ -32,7 +33,7 @@ class Kernel extends ConsoleKernel
|
|||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
$this->load(__DIR__ . '/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
|
|
19
app/Enums/UsefulLinkLocation.php
Normal file
19
app/Enums/UsefulLinkLocation.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum UsefulLinkLocation:String
|
||||
{
|
||||
/**
|
||||
* Top bar
|
||||
* Only visible in the dashboard view
|
||||
*/
|
||||
case topbar = "topbar";
|
||||
|
||||
/**
|
||||
* Dashboard
|
||||
* Only visible in the dashboard view
|
||||
*/
|
||||
case dashboard = "dashboard";
|
||||
|
||||
}
|
|
@ -8,5 +8,6 @@ function getConfig()
|
|||
"name" => "PayPal",
|
||||
"description" => "PayPal payment gateway",
|
||||
"RoutesIgnoreCsrf" => [],
|
||||
"enabled" => (config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) || (config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID') && env("APP_ENV") === "local"),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use App\Models\User;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PayPalCheckoutSdk\Core\PayPalHttpClient;
|
||||
use PayPalCheckoutSdk\Core\ProductionEnvironment;
|
||||
use PayPalCheckoutSdk\Core\SandboxEnvironment;
|
||||
|
@ -74,7 +75,7 @@ function PaypalPay(Request $request)
|
|||
"application_context" => [
|
||||
"cancel_url" => route('payment.Cancel'),
|
||||
"return_url" => route('payment.PayPalSuccess', ['payment' => $payment->id]),
|
||||
'brand_name' => config('app.name', 'Laravel'),
|
||||
'brand_name' => config('app.name', 'CtrlPanel.gg'),
|
||||
'shipping_preference' => 'NO_SHIPPING'
|
||||
]
|
||||
|
||||
|
@ -85,14 +86,23 @@ function PaypalPay(Request $request)
|
|||
// Call API with your client and get a response for your call
|
||||
$response = getPayPalClient()->execute($request);
|
||||
|
||||
// check for any errors in the response
|
||||
if ($response->statusCode != 201) {
|
||||
throw new \Exception($response->statusCode);
|
||||
}
|
||||
|
||||
// make sure the link is not empty
|
||||
if (empty($response->result->links[1]->href)) {
|
||||
throw new \Exception('No redirect link found');
|
||||
}
|
||||
|
||||
Redirect::away($response->result->links[1]->href)->send();
|
||||
return;
|
||||
} catch (HttpException $ex) {
|
||||
error_log($ex->statusCode);
|
||||
error_log($ex->getMessage());
|
||||
|
||||
Log::error('PayPal Payment: ' . $ex->getMessage());
|
||||
$payment->delete();
|
||||
Redirect::route('payment.Cancel');
|
||||
|
||||
Redirect::route('store.index')->with('error', __('Payment failed'))->send();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,5 +10,6 @@ function getConfig()
|
|||
"RoutesIgnoreCsrf" => [
|
||||
"payment/StripeWebhooks",
|
||||
],
|
||||
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') || config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET') && config('SETTINGS::PAYMENTS:STRIPE:TEST_SECRET') && env("APP_ENV") === "local",
|
||||
];
|
||||
}
|
||||
|
|
|
@ -51,13 +51,11 @@ class ExtensionHelper
|
|||
$routes = array_merge($routes, $config['RoutesIgnoreCsrf']);
|
||||
}
|
||||
|
||||
// add extension/ infront of every route
|
||||
foreach ($routes as $key => $route) {
|
||||
$routes[$key] = 'extensions/' . $route;
|
||||
}
|
||||
// map over the routes and add the extension name as prefix
|
||||
$result = array_map(fn ($item) => "extensions/{$item}", $routes);
|
||||
}
|
||||
|
||||
return $routes;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
42
app/Http/Controllers/Admin/LegalController.php
Normal file
42
app/Http/Controllers/Admin/LegalController.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Qirolab\Theme\Theme;
|
||||
|
||||
|
||||
class LegalController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$tos = File::get(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php');
|
||||
$privacy = File::get(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php');
|
||||
$imprint = File::get(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php');
|
||||
|
||||
return view('admin.legal.index')->with([
|
||||
"tos" => $tos,
|
||||
"privacy" => $privacy,
|
||||
"imprint" => $imprint,
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(Request $request){
|
||||
$tos = $request->tos;
|
||||
$privacy = $request->privacy;
|
||||
$imprint = $request->imprint;
|
||||
|
||||
File::put(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php', $tos);
|
||||
File::put(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php', $privacy);
|
||||
File::put(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php', $imprint);
|
||||
|
||||
return back()->with("success",__("Legal pages updated"));
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PartnerDiscount;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -40,26 +41,19 @@ class PartnerController extends Controller
|
|||
'registered_user_discount' => 'required|integer|max:100|min:0',
|
||||
]);
|
||||
|
||||
if(PartnerDiscount::where("user_id",$request->user_id)->exists()){
|
||||
return redirect()->route('admin.partners.index')->with('error', __('Partner already exists'));
|
||||
}
|
||||
|
||||
PartnerDiscount::create($request->all());
|
||||
|
||||
return redirect()->route('admin.partners.index')->with('success', __('partner has been created!'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Voucher $voucher
|
||||
* @return Response
|
||||
*/
|
||||
public function show(Voucher $voucher)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param Voucher $voucher
|
||||
* @param Partner $partner
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function edit(PartnerDiscount $partner)
|
||||
|
@ -75,7 +69,7 @@ class PartnerController extends Controller
|
|||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Voucher $voucher
|
||||
* @param Partner $partner
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function update(Request $request, PartnerDiscount $partner)
|
||||
|
@ -95,7 +89,7 @@ class PartnerController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Voucher $voucher
|
||||
* @param Partner $partner
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function destroy(PartnerDiscount $partner)
|
||||
|
@ -105,81 +99,7 @@ class PartnerController extends Controller
|
|||
return redirect()->back()->with('success', __('partner has been removed!'));
|
||||
}
|
||||
|
||||
public function users(Voucher $voucher)
|
||||
{
|
||||
return view('admin.vouchers.users', [
|
||||
'voucher' => $voucher,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function redeem(Request $request)
|
||||
{
|
||||
//general validations
|
||||
$request->validate([
|
||||
'code' => 'required|exists:vouchers,code',
|
||||
]);
|
||||
|
||||
//get voucher by code
|
||||
$voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail();
|
||||
|
||||
//extra validations
|
||||
if ($voucher->getStatus() == 'USES_LIMIT_REACHED') {
|
||||
throw ValidationException::withMessages([
|
||||
'code' => __('This voucher has reached the maximum amount of uses'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($voucher->getStatus() == 'EXPIRED') {
|
||||
throw ValidationException::withMessages([
|
||||
'code' => __('This voucher has expired'),
|
||||
]);
|
||||
}
|
||||
|
||||
if (! $request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) {
|
||||
throw ValidationException::withMessages([
|
||||
'code' => __('You already redeemed this voucher code'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($request->user()->credits + $voucher->credits >= 99999999) {
|
||||
throw ValidationException::withMessages([
|
||||
'code' => "You can't redeem this voucher because you would exceed the limit of ".CREDITS_DISPLAY_NAME,
|
||||
]);
|
||||
}
|
||||
|
||||
//redeem voucher
|
||||
$voucher->redeem($request->user());
|
||||
|
||||
event(new UserUpdateCreditsEvent($request->user()));
|
||||
|
||||
return response()->json([
|
||||
'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME.' '.__('have been added to your balance!'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function usersDataTable(Voucher $voucher)
|
||||
{
|
||||
$users = $voucher->users();
|
||||
|
||||
return datatables($users)
|
||||
->editColumn('name', function (User $user) {
|
||||
return '<a class="text-info" target="_blank" href="'.route('admin.users.show', $user->id).'">'.$user->name.'</a>';
|
||||
})
|
||||
->addColumn('credits', function (User $user) {
|
||||
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
|
||||
})
|
||||
->addColumn('last_seen', function (User $user) {
|
||||
return $user->last_seen ? $user->last_seen->diffForHumans() : '';
|
||||
})
|
||||
->rawColumns(['name', 'credits', 'last_seen'])
|
||||
->make();
|
||||
}
|
||||
|
||||
public function dataTable()
|
||||
{
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Events\PaymentEvent;
|
||||
use App\Events\UserUpdateCreditsEvent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PartnerDiscount;
|
||||
|
@ -38,19 +39,29 @@ class PaymentController extends Controller
|
|||
*/
|
||||
public function checkOut(ShopProduct $shopProduct)
|
||||
{
|
||||
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
|
||||
$discount = PartnerDiscount::getDiscount();
|
||||
$price = $shopProduct->price - ($shopProduct->price * $discount / 100);
|
||||
|
||||
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
|
||||
$paymentGateways = [];
|
||||
foreach ($extensions as $extension) {
|
||||
$extensionName = basename($extension);
|
||||
$payment = new \stdClass();
|
||||
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
|
||||
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
|
||||
$paymentGateways[] = $payment;
|
||||
if ($price > 0) {
|
||||
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
|
||||
|
||||
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
|
||||
foreach ($extensions as $extension) {
|
||||
$extensionName = basename($extension);
|
||||
if (!ExtensionHelper::getExtensionConfig($extensionName, 'enabled')) continue; // skip if not enabled
|
||||
|
||||
$payment = new \stdClass();
|
||||
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
|
||||
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
|
||||
$paymentGateways[] = $payment;
|
||||
}
|
||||
}
|
||||
|
||||
$discount = PartnerDiscount::getDiscount();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return view('store.checkout')->with([
|
||||
'product' => $shopProduct,
|
||||
|
@ -61,6 +72,7 @@ class PaymentController extends Controller
|
|||
'taxpercent' => $shopProduct->getTaxPercent(),
|
||||
'total' => $shopProduct->getTotalPrice(),
|
||||
'paymentGateways' => $paymentGateways,
|
||||
'productIsFree' => $price <= 0,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -69,29 +81,12 @@ class PaymentController extends Controller
|
|||
* @param ShopProduct $shopProduct
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function FreePay(ShopProduct $shopProduct)
|
||||
public function handleFreeProduct(ShopProduct $shopProduct)
|
||||
{
|
||||
//check if the product is really free or the discount is 100%
|
||||
if ($shopProduct->getTotalPrice() > 0) return redirect()->route('home')->with('error', __('An error ocured. Please try again.'));
|
||||
|
||||
//give product
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
//not updating server limit
|
||||
|
||||
//update User with bought item
|
||||
if ($shopProduct->type == "Credits") {
|
||||
$user->increment('credits', $shopProduct->quantity);
|
||||
} elseif ($shopProduct->type == "Server slots") {
|
||||
$user->increment('server_limit', $shopProduct->quantity);
|
||||
}
|
||||
|
||||
//skipped the referral commission, because the user did not pay anything.
|
||||
|
||||
//not giving client role
|
||||
|
||||
//store payment
|
||||
//create a payment
|
||||
$payment = Payment::create([
|
||||
'user_id' => $user->id,
|
||||
'payment_id' => uniqid(),
|
||||
|
@ -108,6 +103,7 @@ class PaymentController extends Controller
|
|||
]);
|
||||
|
||||
event(new UserUpdateCreditsEvent($user));
|
||||
event(new PaymentEvent($user, $payment, $shopProduct));
|
||||
|
||||
//not sending an invoice
|
||||
|
||||
|
@ -120,6 +116,12 @@ class PaymentController extends Controller
|
|||
$product = ShopProduct::find($request->product_id);
|
||||
$paymentGateway = $request->payment_method;
|
||||
|
||||
// on free products, we don't need to use a payment gateway
|
||||
$realPrice = $product->price - ($product->price * PartnerDiscount::getDiscount() / 100);
|
||||
if ($realPrice <= 0) {
|
||||
return $this->handleFreeProduct($product);
|
||||
}
|
||||
|
||||
return redirect()->route('payment.' . $paymentGateway . 'Pay', ['shopProduct' => $product->id]);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ use Illuminate\Http\JsonResponse;
|
|||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class ServerController extends Controller
|
||||
{
|
||||
|
@ -27,38 +28,6 @@ class ServerController extends Controller
|
|||
return view('admin.servers.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Server $server
|
||||
* @return Response
|
||||
*/
|
||||
public function show(Server $server)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
|
@ -196,6 +165,8 @@ class ServerController extends Controller
|
|||
public function dataTable(Request $request)
|
||||
{
|
||||
$query = Server::with(['user', 'product']);
|
||||
|
||||
|
||||
if ($request->has('product')) {
|
||||
$query->where('product_id', '=', $request->input('product'));
|
||||
}
|
||||
|
@ -204,6 +175,9 @@ class ServerController extends Controller
|
|||
}
|
||||
$query->select('servers.*');
|
||||
|
||||
Log::info($request->input('order'));
|
||||
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('user', function (Server $server) {
|
||||
return '<a href="' . route('admin.users.show', $server->user->id) . '">' . $server->user->name . '</a>';
|
||||
|
@ -232,7 +206,7 @@ class ServerController extends Controller
|
|||
';
|
||||
})
|
||||
->addColumn('status', function (Server $server) {
|
||||
$labelColor = $server->isSuspended() ? 'text-danger' : 'text-success';
|
||||
$labelColor = $server->suspended ? 'text-danger' : 'text-success';
|
||||
|
||||
return '<i class="fas ' . $labelColor . ' fa-circle mr-2"></i>';
|
||||
})
|
||||
|
|
|
@ -22,7 +22,13 @@ class SettingsController extends Controller
|
|||
|
||||
//Get all tabs as laravel view paths
|
||||
$tabs = [];
|
||||
foreach (glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php') as $filename) {
|
||||
if(file_exists(Theme::getViewPaths()[0] . '/admin/settings/tabs/')){
|
||||
$tabspath = glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php');
|
||||
}else{
|
||||
$tabspath = glob(Theme::path($path = 'views', $themeName = 'default').'/admin/settings/tabs/*.blade.php');
|
||||
}
|
||||
|
||||
foreach ($tabspath as $filename) {
|
||||
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ use Illuminate\Validation\Rule;
|
|||
|
||||
class ShopProductController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -66,23 +67,12 @@ class ShopProductController extends Controller
|
|||
'display' => 'required|string|max:60',
|
||||
]);
|
||||
|
||||
$disabled = ! is_null($request->input('disabled'));
|
||||
$disabled = !is_null($request->input('disabled'));
|
||||
ShopProduct::create(array_merge($request->all(), ['disabled' => $disabled]));
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Store item has been created!'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param ShopProduct $shopProduct
|
||||
* @return Response
|
||||
*/
|
||||
public function show(ShopProduct $shopProduct)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
|
@ -116,7 +106,7 @@ class ShopProductController extends Controller
|
|||
'display' => 'required|string|max:60',
|
||||
]);
|
||||
|
||||
$disabled = ! is_null($request->input('disabled'));
|
||||
$disabled = !is_null($request->input('disabled'));
|
||||
$shopProduct->update(array_merge($request->all(), ['disabled' => $disabled]));
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Store item has been updated!'));
|
||||
|
@ -129,7 +119,7 @@ class ShopProductController extends Controller
|
|||
*/
|
||||
public function disable(Request $request, ShopProduct $shopProduct)
|
||||
{
|
||||
$shopProduct->update(['disabled' => ! $shopProduct->disabled]);
|
||||
$shopProduct->update(['disabled' => !$shopProduct->disabled]);
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Product has been updated!'));
|
||||
}
|
||||
|
@ -147,19 +137,20 @@ class ShopProductController extends Controller
|
|||
return redirect()->back()->with('success', __('Store item has been removed!'));
|
||||
}
|
||||
|
||||
public function dataTable()
|
||||
public function dataTable(Request $request)
|
||||
{
|
||||
$query = ShopProduct::query();
|
||||
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('actions', function (ShopProduct $shopProduct) {
|
||||
return '
|
||||
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.store.edit', $shopProduct->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.store.edit', $shopProduct->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.destroy', $shopProduct->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('DELETE').'
|
||||
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.destroy', $shopProduct->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('DELETE') . '
|
||||
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
';
|
||||
})
|
||||
|
@ -167,12 +158,12 @@ class ShopProductController extends Controller
|
|||
$checked = $shopProduct->disabled == false ? 'checked' : '';
|
||||
|
||||
return '
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.disable', $shopProduct->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('PATCH').'
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.disable', $shopProduct->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('PATCH') . '
|
||||
<div class="custom-control custom-switch">
|
||||
<input '.$checked.' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch'.$shopProduct->id.'">
|
||||
<label class="custom-control-label" for="switch'.$shopProduct->id.'"></label>
|
||||
<input ' . $checked . ' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch' . $shopProduct->id . '">
|
||||
<label class="custom-control-label" for="switch' . $shopProduct->id . '"></label>
|
||||
</div>
|
||||
</form>
|
||||
';
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Enums\UsefulLinkLocation;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\UsefulLink;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
|
@ -30,7 +31,8 @@ class UsefulLinkController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.usefullinks.create');
|
||||
$positions = UsefulLinkLocation::cases();
|
||||
return view('admin.usefullinks.create')->with('positions', $positions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,7 +50,14 @@ class UsefulLinkController extends Controller
|
|||
'description' => 'required|string|max:2000',
|
||||
]);
|
||||
|
||||
UsefulLink::create($request->all());
|
||||
|
||||
UsefulLink::create([
|
||||
'icon' => $request->icon,
|
||||
'title' => $request->title,
|
||||
'link' => $request->link,
|
||||
'description' => $request->description,
|
||||
'position' => implode(",",$request->position),
|
||||
]);
|
||||
|
||||
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been created!'));
|
||||
}
|
||||
|
@ -72,8 +81,10 @@ class UsefulLinkController extends Controller
|
|||
*/
|
||||
public function edit(UsefulLink $usefullink)
|
||||
{
|
||||
$positions = UsefulLinkLocation::cases();
|
||||
return view('admin.usefullinks.edit', [
|
||||
'link' => $usefullink,
|
||||
'positions' => $positions,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -93,7 +104,13 @@ class UsefulLinkController extends Controller
|
|||
'description' => 'required|string|max:2000',
|
||||
]);
|
||||
|
||||
$usefullink->update($request->all());
|
||||
$usefullink->update([
|
||||
'icon' => $request->icon,
|
||||
'title' => $request->title,
|
||||
'link' => $request->link,
|
||||
'description' => $request->description,
|
||||
'position' => implode(",",$request->position),
|
||||
]);
|
||||
|
||||
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been updated!'));
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ use Spatie\QueryBuilder\QueryBuilder;
|
|||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
private Pterodactyl $pterodactyl;
|
||||
|
||||
public function __construct(Pterodactyl $pterodactyl)
|
||||
|
@ -132,7 +133,7 @@ class UserController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
if (! is_null($request->input('new_password'))) {
|
||||
if (!is_null($request->input('new_password'))) {
|
||||
$request->validate([
|
||||
'new_password' => 'required|string|min:8',
|
||||
'new_password_confirmation' => 'required|same:new_password',
|
||||
|
@ -259,7 +260,7 @@ class UserController extends Controller
|
|||
public function toggleSuspended(User $user)
|
||||
{
|
||||
try {
|
||||
! $user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
||||
!$user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
||||
} catch (Exception $exception) {
|
||||
return redirect()->back()->with('error', $exception->getMessage());
|
||||
}
|
||||
|
@ -270,52 +271,45 @@ class UserController extends Controller
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function dataTable()
|
||||
public function dataTable(Request $request)
|
||||
{
|
||||
$query = User::with(['discordUser', 'servers'])->select('users.*');
|
||||
$query = User::with('discordUser')->withCount('servers');
|
||||
// manually count referrals in user_referrals table
|
||||
$query->selectRaw('users.*, (SELECT COUNT(*) FROM user_referrals WHERE user_referrals.referral_id = users.id) as referrals_count');
|
||||
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('avatar', function (User $user) {
|
||||
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="'.$user->getAvatar().'">';
|
||||
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="' . $user->getAvatar() . '">';
|
||||
})
|
||||
->addColumn('credits', function (User $user) {
|
||||
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
|
||||
return '<i class="fas fa-coins mr-2"></i> ' . $user->credits();
|
||||
})
|
||||
->addColumn('verified', function (User $user) {
|
||||
return $user->getVerifiedStatus();
|
||||
})
|
||||
->addColumn('servers', function (User $user) {
|
||||
return $user->servers->count();
|
||||
})
|
||||
->addColumn('referrals', function (User $user) {
|
||||
return DB::table('user_referrals')->where('referral_id', '=', $user->id)->count();
|
||||
})
|
||||
->addColumn('discordId', function (User $user) {
|
||||
return $user->discordUser ? $user->discordUser->id : '';
|
||||
})
|
||||
->addColumn('last_seen', function (User $user) {
|
||||
return ['display' => $user->last_seen ? $user->last_seen->diffForHumans() : '',
|
||||
'raw' => $user->last_seen ? strtotime($user->last_seen) : '', ];
|
||||
})
|
||||
->addColumn('actions', function (User $user) {
|
||||
$suspendColor = $user->isSuspended() ? 'btn-success' : 'btn-warning';
|
||||
$suspendIcon = $user->isSuspended() ? 'fa-play-circle' : 'fa-pause-circle';
|
||||
$suspendText = $user->isSuspended() ? __('Unsuspend') : __('Suspend');
|
||||
|
||||
return '
|
||||
<a data-content="'.__('Login as User').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.loginas', $user->id).'" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
|
||||
<a data-content="'.__('Verify').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.verifyEmail', $user->id).'" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
|
||||
<a data-content="'.__('Show').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.show', $user->id).'" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
|
||||
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.edit', $user->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('admin.users.togglesuspend', $user->id).'">
|
||||
'.csrf_field().'
|
||||
<button data-content="'.$suspendText.'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm '.$suspendColor.' text-white mr-1"><i class="far '.$suspendIcon.'"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.users.destroy', $user->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('DELETE').'
|
||||
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
<a data-content="' . __('Login as User') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.loginas', $user->id) . '" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
|
||||
<a data-content="' . __('Verify') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.verifyEmail', $user->id) . '" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
|
||||
<a data-content="' . __('Show') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.show', $user->id) . '" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
|
||||
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.edit', $user->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<form class="d-inline" method="post" action="' . route('admin.users.togglesuspend', $user->id) . '">
|
||||
' . csrf_field() . '
|
||||
<button data-content="' . $suspendText . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm ' . $suspendColor . ' text-white mr-1"><i class="far ' . $suspendIcon . '"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.users.destroy', $user->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('DELETE') . '
|
||||
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
';
|
||||
})
|
||||
->editColumn('role', function (User $user) {
|
||||
|
@ -334,15 +328,15 @@ class UserController extends Controller
|
|||
break;
|
||||
}
|
||||
|
||||
return '<span class="badge '.$badgeColor.'">'.$user->role.'</span>';
|
||||
return '<span class="badge ' . $badgeColor . '">' . $user->role . '</span>';
|
||||
})
|
||||
->editColumn('last_seen', function (User $user) {
|
||||
return $user->last_seen ? $user->last_seen->diffForHumans() : __('Never');
|
||||
})
|
||||
->editColumn('name', function (User $user) {
|
||||
return '<a class="text-info" target="_blank" href="'.config('SETTINGS::SYSTEM:PTERODACTYL:URL').'/admin/users/view/'.$user->pterodactyl_id.'">'.strip_tags($user->name).'</a>';
|
||||
return '<a class="text-info" target="_blank" href="' . config('SETTINGS::SYSTEM:PTERODACTYL:URL') . '/admin/users/view/' . $user->pterodactyl_id . '">' . strip_tags($user->name) . '</a>';
|
||||
})
|
||||
/*->orderColumn('last_seen', function ($query) {
|
||||
$query->orderBy('last_seen', "desc");
|
||||
})*/
|
||||
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'referrals', 'actions', 'last_seen'])
|
||||
->make(true);
|
||||
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'actions'])
|
||||
->make();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ use App\Http\Controllers\Controller;
|
|||
use App\Models\DiscordUser;
|
||||
use App\Models\User;
|
||||
use App\Notifications\ReferralNotification;
|
||||
use App\Traits\Referral;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
@ -27,6 +28,8 @@ use Spatie\QueryBuilder\QueryBuilder;
|
|||
|
||||
class UserController extends Controller
|
||||
{
|
||||
use Referral;
|
||||
|
||||
const ALLOWED_INCLUDES = ['servers', 'notifications', 'payments', 'vouchers', 'discordUser'];
|
||||
|
||||
const ALLOWED_FILTERS = ['name', 'server_limit', 'email', 'pterodactyl_id', 'role', 'suspended'];
|
||||
|
@ -92,7 +95,7 @@ class UserController extends Controller
|
|||
|
||||
//Update Users Password on Pterodactyl
|
||||
//Username,Mail,First and Lastname are required aswell
|
||||
$response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [
|
||||
$response = Pterodactyl::client()->patch('/application/users/' . $user->pterodactyl_id, [
|
||||
'username' => $request->name,
|
||||
'first_name' => $request->name,
|
||||
'last_name' => $request->name,
|
||||
|
@ -229,7 +232,7 @@ class UserController extends Controller
|
|||
$discordUser = DiscordUser::find($id);
|
||||
$user = $discordUser ? $discordUser->user : User::findOrFail($id);
|
||||
|
||||
if (! $user->isSuspended()) {
|
||||
if (!$user->isSuspended()) {
|
||||
throw ValidationException::withMessages([
|
||||
'error' => 'You cannot unsuspend an User who is not suspended.',
|
||||
]);
|
||||
|
@ -240,21 +243,6 @@ class UserController extends Controller
|
|||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a unique Referral Code for User
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function createReferralCode()
|
||||
{
|
||||
$referralcode = STR::random(8);
|
||||
if (User::where('referral_code', '=', $referralcode)->exists()) {
|
||||
$this->createReferralCode();
|
||||
}
|
||||
|
||||
return $referralcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
|
@ -267,7 +255,7 @@ class UserController extends Controller
|
|||
]);
|
||||
|
||||
// Prevent the creation of new users via API if this is enabled.
|
||||
if (! config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
|
||||
if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
|
||||
throw ValidationException::withMessages([
|
||||
'error' => 'The creation of new users has been blocked by the system administrator.',
|
||||
]);
|
||||
|
@ -305,7 +293,7 @@ class UserController extends Controller
|
|||
'pterodactyl_id' => $response->json()['attributes']['id'],
|
||||
]);
|
||||
//INCREMENT REFERRAL-USER CREDITS
|
||||
if (! empty($request->input('referral_code'))) {
|
||||
if (!empty($request->input('referral_code'))) {
|
||||
$ref_code = $request->input('referral_code');
|
||||
$new_user = $user->id;
|
||||
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {
|
||||
|
|
|
@ -7,11 +7,13 @@ use App\Http\Controllers\Controller;
|
|||
use App\Models\User;
|
||||
use App\Notifications\ReferralNotification;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use App\Traits\Referral;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
@ -29,7 +31,7 @@ class RegisterController extends Controller
|
|||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
use RegistersUsers, Referral;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
|
@ -86,21 +88,6 @@ class RegisterController extends Controller
|
|||
return Validator::make($data, $validationRules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a unique Referral Code for User
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function createReferralCode()
|
||||
{
|
||||
$referralcode = STR::random(8);
|
||||
if (User::where('referral_code', '=', $referralcode)->exists()) {
|
||||
$this->createReferralCode();
|
||||
}
|
||||
|
||||
return $referralcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
|
@ -132,6 +119,7 @@ class RegisterController extends Controller
|
|||
|
||||
if ($response->failed()) {
|
||||
$user->delete();
|
||||
Log::error('Pterodactyl Registration Error: ' . $response->json()['errors'][0]['detail']);
|
||||
throw ValidationException::withMessages([
|
||||
'ptero_registration_error' => [__('Account already exists on Pterodactyl. Please contact the Support!')],
|
||||
]);
|
||||
|
@ -142,7 +130,7 @@ class RegisterController extends Controller
|
|||
]);
|
||||
|
||||
//INCREMENT REFERRAL-USER CREDITS
|
||||
if (! empty($data['referral_code'])) {
|
||||
if (!empty($data['referral_code'])) {
|
||||
$ref_code = $data['referral_code'];
|
||||
$new_user = $user->id;
|
||||
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {
|
||||
|
@ -154,7 +142,7 @@ class RegisterController extends Controller
|
|||
activity()
|
||||
->performedOn($user)
|
||||
->causedBy($ref_user)
|
||||
->log('gained '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').' for sign-up-referral of '.$user->name.' (ID:'.$user->id.')');
|
||||
->log('gained ' . config('SETTINGS::REFERRAL::REWARD') . ' ' . config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME') . ' for sign-up-referral of ' . $user->name . ' (ID:' . $user->id . ')');
|
||||
}
|
||||
//INSERT INTO USER_REFERRALS TABLE
|
||||
DB::table('user_referrals')->insert([
|
||||
|
|
|
@ -25,16 +25,18 @@ class HomeController extends Controller
|
|||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: This is commented due to the fact the market is a bad dependency, will be changed later.
|
||||
public function callHome()
|
||||
{
|
||||
if (Storage::exists('callHome')) {
|
||||
return;
|
||||
}
|
||||
Http::asForm()->post('https://market.controlpanel.gg/callhome.php', [
|
||||
Http::asForm()->post('https://market.ctrlpanel.gg/callhome.php', [
|
||||
'id' => Hash::make(URL::current()),
|
||||
]);
|
||||
Storage::put('callHome', 'This is only used to count the installations of cpgg.');
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @description Get the Background Color for the Days-Left-Box in HomeView
|
||||
|
@ -105,13 +107,13 @@ class HomeController extends Controller
|
|||
$unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __('hours')) : __('days');
|
||||
}
|
||||
|
||||
$this->callhome();
|
||||
//$this->callhome(); TODO: Same as the function
|
||||
|
||||
// RETURN ALL VALUES
|
||||
return view('home')->with([
|
||||
'usage' => $usage,
|
||||
'credits' => $credits,
|
||||
'useful_links' => UsefulLink::all()->sortBy('id'),
|
||||
'useful_links_dashboard' => UsefulLink::where("position","like","%dashboard%")->get()->sortby("id"),
|
||||
'bg' => $bg,
|
||||
'boxText' => $boxText,
|
||||
'unit' => $unit,
|
||||
|
|
117
app/Http/Controllers/Moderation/TicketCategoryController.php
Normal file
117
app/Http/Controllers/Moderation/TicketCategoryController.php
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Moderation;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketCategory;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TicketCategoryController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$categories = TicketCategory::all();
|
||||
return view('moderator.ticket.category')->with("categories",$categories);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'name' => 'required|string|max:191',
|
||||
]);
|
||||
|
||||
TicketCategory::create($request->all());
|
||||
|
||||
|
||||
return redirect(route("moderator.ticket.category.index"))->with("success",__("Category created"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'category' => 'required|int',
|
||||
'name' => 'required|string|max:191',
|
||||
]);
|
||||
|
||||
$category = TicketCategory::where("id",$request->category)->firstOrFail();
|
||||
|
||||
$category->name = $request->name;
|
||||
$category->save();
|
||||
|
||||
return redirect()->back()->with("success",__("Category name updated"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$category = TicketCategory::where("id",$id)->firstOrFail();
|
||||
|
||||
if($category->id == 5 ){ //cannot delete "other" category
|
||||
return back()->with("error","You cannot delete that category");
|
||||
}
|
||||
|
||||
$tickets = Ticket::where("ticketcategory_id",$category->id)->get();
|
||||
|
||||
foreach($tickets as $ticket){
|
||||
$ticket->ticketcategory_id = "5";
|
||||
$ticket->save();
|
||||
}
|
||||
|
||||
$category->delete();
|
||||
|
||||
return redirect()
|
||||
->route('moderator.ticket.category.index')
|
||||
->with('success', __('Category removed'));
|
||||
}
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
$query = TicketCategory::withCount("tickets");
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('name', function ( TicketCategory $category) {
|
||||
return $category->name;
|
||||
})
|
||||
->editColumn('tickets', function ( TicketCategory $category) {
|
||||
return $category->tickets_count;
|
||||
})
|
||||
->addColumn('actions', function (TicketCategory $category) {
|
||||
return '
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('moderator.ticket.category.destroy', $category->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('DELETE').'
|
||||
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
';
|
||||
})
|
||||
->editColumn('created_at', function (TicketCategory $category) {
|
||||
return $category->created_at ? $category->created_at->diffForHumans() : '';
|
||||
})
|
||||
->rawColumns(['actions'])
|
||||
->make();
|
||||
}
|
||||
}
|
|
@ -25,7 +25,12 @@ class TicketsController extends Controller
|
|||
|
||||
public function show($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticketcomments = $ticket->ticketcomments;
|
||||
$ticketcategory = $ticket->ticketcategory;
|
||||
$server = Server::where('id', $ticket->server)->first();
|
||||
|
@ -33,9 +38,20 @@ class TicketsController extends Controller
|
|||
return view('moderator.ticket.show', compact('ticket', 'ticketcategory', 'ticketcomments', 'server'));
|
||||
}
|
||||
|
||||
public function close($ticket_id)
|
||||
public function changeStatus($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch(Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
|
||||
if($ticket->status == "Closed"){
|
||||
$ticket->status = "Reopened";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
|
||||
}
|
||||
$ticket->status = 'Closed';
|
||||
$ticket->save();
|
||||
$ticketOwner = $ticket->user;
|
||||
|
@ -45,7 +61,13 @@ class TicketsController extends Controller
|
|||
|
||||
public function delete($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
|
||||
TicketComment::where('ticket_id', $ticket->id)->delete();
|
||||
$ticket->delete();
|
||||
|
||||
|
@ -55,7 +77,11 @@ class TicketsController extends Controller
|
|||
public function reply(Request $request)
|
||||
{
|
||||
$this->validate($request, ['ticketcomment' => 'required']);
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
try {
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
} catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticket->status = 'Answered';
|
||||
$ticket->update();
|
||||
TicketComment::create([
|
||||
|
@ -63,7 +89,12 @@ class TicketsController extends Controller
|
|||
'user_id' => Auth::user()->id,
|
||||
'ticketcomment' => $request->input('ticketcomment'),
|
||||
]);
|
||||
try {
|
||||
$user = User::where('id', $ticket->user_id)->firstOrFail();
|
||||
} catch(Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check on the admin database or try again later.'));
|
||||
}
|
||||
$newmessage = $request->input('ticketcomment');
|
||||
$user->notify(new ReplyNotification($ticket, $user, $newmessage));
|
||||
|
||||
|
@ -85,12 +116,16 @@ class TicketsController extends Controller
|
|||
return '<a href="'.route('admin.users.show', $tickets->user->id).'">'.$tickets->user->name.'</a>';
|
||||
})
|
||||
->addColumn('actions', function (Ticket $tickets) {
|
||||
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
|
||||
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
|
||||
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
|
||||
|
||||
return '
|
||||
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('moderator.ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('POST').'
|
||||
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
|
||||
<button data-content="'.__($statusButtonText).'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white '.$statusButtonColor.' mr-1"><i class="fas '.$statusButtonIcon.'"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.delete', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
|
@ -101,6 +136,7 @@ class TicketsController extends Controller
|
|||
})
|
||||
->editColumn('status', function (Ticket $tickets) {
|
||||
switch ($tickets->status) {
|
||||
case 'Reopened':
|
||||
case 'Open':
|
||||
$badgeColor = 'badge-success';
|
||||
break;
|
||||
|
@ -135,8 +171,13 @@ class TicketsController extends Controller
|
|||
|
||||
public function blacklistAdd(Request $request)
|
||||
{
|
||||
$user = User::where('id', $request->user_id)->first();
|
||||
try {
|
||||
$user = User::where('id', $request->user_id)->firstOrFail();
|
||||
$check = TicketBlacklist::where('user_id', $user->id)->first();
|
||||
}
|
||||
catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
|
||||
}
|
||||
if ($check) {
|
||||
$check->reason = $request->reason;
|
||||
$check->status = 'True';
|
||||
|
@ -163,7 +204,12 @@ class TicketsController extends Controller
|
|||
|
||||
public function blacklistChange($id)
|
||||
{
|
||||
$blacklist = TicketBlacklist::where('id', $id)->first();
|
||||
try {
|
||||
$blacklist = TicketBlacklist::where('id', $id)->first();
|
||||
}
|
||||
catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
|
||||
}
|
||||
if ($blacklist->status == 'True') {
|
||||
$blacklist->status = 'False';
|
||||
} else {
|
||||
|
|
|
@ -26,53 +26,50 @@ class TicketsController extends Controller
|
|||
return view('ticket.index', compact('tickets', 'ticketcategories'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
|
||||
}
|
||||
$ticketcategories = TicketCategory::all();
|
||||
$servers = Auth::user()->servers;
|
||||
|
||||
return view('ticket.create', compact('ticketcategories', 'servers'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'title' => 'required',
|
||||
'ticketcategory' => 'required',
|
||||
'priority' => 'required',
|
||||
'message' => 'required', ]
|
||||
'title' => 'required',
|
||||
'ticketcategory' => 'required',
|
||||
'priority' => 'required',
|
||||
'message' => 'required',]
|
||||
);
|
||||
$ticket = new Ticket([
|
||||
'title' => $request->input('title'),
|
||||
'user_id' => Auth::user()->id,
|
||||
'ticket_id' => strtoupper(Str::random(5)),
|
||||
'ticketcategory_id' => $request->input('ticketcategory'),
|
||||
'priority' => $request->input('priority'),
|
||||
'message' => $request->input('message'),
|
||||
'status' => 'Open',
|
||||
'server' => $request->input('server'), ]
|
||||
'title' => $request->input('title'),
|
||||
'user_id' => Auth::user()->id,
|
||||
'ticket_id' => strtoupper(Str::random(8)),
|
||||
'ticketcategory_id' => $request->input('ticketcategory'),
|
||||
'priority' => $request->input('priority'),
|
||||
'message' => $request->input('message'),
|
||||
'status' => 'Open',
|
||||
'server' => $request->input('server'),]
|
||||
);
|
||||
$ticket->save();
|
||||
$user = Auth::user();
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "all"){ $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();}
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "admin"){ $admin = User::where('role', 'admin')->get();}
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "moderator"){ $admin = User::where('role', 'mod')->get();}
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "all") {
|
||||
$admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();
|
||||
}
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "admin") {
|
||||
$admin = User::where('role', 'admin')->get();
|
||||
}
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "moderator") {
|
||||
$admin = User::where('role', 'mod')->get();
|
||||
}
|
||||
$user->notify(new CreateNotification($ticket));
|
||||
if(config('SETTINGS::TICKET:NOTIFY') != "none"){
|
||||
if (config('SETTINGS::TICKET:NOTIFY') != "none") {
|
||||
Notification::send($admin, new AdminCreateNotification($ticket, $user));
|
||||
}
|
||||
|
||||
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #').$ticket->ticket_id);
|
||||
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #') . $ticket->ticket_id);
|
||||
}
|
||||
|
||||
public function show($ticket_id)
|
||||
{
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticketcomments = $ticket->ticketcomments;
|
||||
$ticketcategory = $ticket->ticketcategory;
|
||||
$server = Server::where('id', $ticket->server)->first();
|
||||
|
@ -85,10 +82,14 @@ class TicketsController extends Controller
|
|||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
|
||||
}
|
||||
$this->validate($request, ['ticketcomment' => 'required']);
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
try {
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticket->status = 'Client Reply';
|
||||
$ticket->update();
|
||||
$ticketcomment = TicketComment::create([
|
||||
|
@ -104,9 +105,32 @@ class TicketsController extends Controller
|
|||
|
||||
return redirect()->back()->with('success', __('Your comment has been submitted'));
|
||||
}
|
||||
public function close($ticket_id)
|
||||
|
||||
public function create()
|
||||
{
|
||||
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
|
||||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
|
||||
}
|
||||
$ticketcategories = TicketCategory::all();
|
||||
$servers = Auth::user()->servers;
|
||||
|
||||
return view('ticket.create', compact('ticketcategories', 'servers'));
|
||||
}
|
||||
|
||||
public function changeStatus($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
if ($ticket->status == "Closed") {
|
||||
$ticket->status = "Reopened";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
|
||||
}
|
||||
$ticket->status = "Closed";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been closed, ID: #') . $ticket->ticket_id);
|
||||
|
@ -121,10 +145,11 @@ class TicketsController extends Controller
|
|||
return $tickets->ticketcategory->name;
|
||||
})
|
||||
->editColumn('title', function (Ticket $tickets) {
|
||||
return '<a class="text-info" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'">'.'#'.$tickets->ticket_id.' - '.htmlspecialchars($tickets->title).'</a>';
|
||||
return '<a class="text-info" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '">' . '#' . $tickets->ticket_id . ' - ' . htmlspecialchars($tickets->title) . '</a>';
|
||||
})
|
||||
->editColumn('status', function (Ticket $tickets) {
|
||||
switch ($tickets->status) {
|
||||
case 'Reopened':
|
||||
case 'Open':
|
||||
$badgeColor = 'badge-success';
|
||||
break;
|
||||
|
@ -139,21 +164,26 @@ class TicketsController extends Controller
|
|||
break;
|
||||
}
|
||||
|
||||
return '<span class="badge '.$badgeColor.'">'.$tickets->status.'</span>';
|
||||
return '<span class="badge ' . $badgeColor . '">' . $tickets->status . '</span>';
|
||||
})
|
||||
->editColumn('priority', function (Ticket $tickets) {
|
||||
return __($tickets->priority);
|
||||
})
|
||||
->editColumn('updated_at', function (Ticket $tickets) {
|
||||
return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '';
|
||||
return ['display' => $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '',
|
||||
'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : ''];
|
||||
})
|
||||
->addColumn('actions', function (Ticket $tickets) {
|
||||
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
|
||||
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
|
||||
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
|
||||
|
||||
return '
|
||||
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('POST').'
|
||||
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
|
||||
<a data-content="' . __('View') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="' . route('ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('POST') . '
|
||||
<button data-content="' . __($statusButtonText) . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white ' . $statusButtonColor . ' mr-1"><i class="fas ' . $statusButtonIcon . '"></i></button>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -22,9 +22,10 @@ class Verified
|
|||
*/
|
||||
public function handle($event)
|
||||
{
|
||||
if (! $event->user->email_verified_reward) {
|
||||
if (!$event->user->email_verified_reward) {
|
||||
$event->user->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL'));
|
||||
$event->user->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'));
|
||||
$event->user->update(['email_verified_reward' => true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ class Payment extends Model
|
|||
use HasFactory;
|
||||
|
||||
public $incrementing = false;
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
|
|
|
@ -10,6 +10,6 @@ class TicketCategory extends Model
|
|||
|
||||
public function tickets()
|
||||
{
|
||||
return $this->hasMany(Ticket::class);
|
||||
return $this->hasMany(Ticket::class,'ticketcategory_id');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,5 +16,6 @@ class UsefulLink extends Model
|
|||
'title',
|
||||
'link',
|
||||
'description',
|
||||
'position',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
'avatar',
|
||||
'suspended',
|
||||
'referral_code',
|
||||
'email_verified_reward'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -83,6 +84,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
'last_seen' => 'datetime',
|
||||
'credits' => 'float',
|
||||
'server_limit' => 'float',
|
||||
'email_verified_reward' => 'boolean'
|
||||
];
|
||||
|
||||
public static function boot()
|
||||
|
@ -94,23 +96,16 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
});
|
||||
|
||||
static::deleting(function (User $user) {
|
||||
$user->servers()->chunk(10, function ($servers) {
|
||||
foreach ($servers as $server) {
|
||||
$server->delete();
|
||||
}
|
||||
|
||||
|
||||
// delete every server the user owns without using chunks
|
||||
$user->servers()->each(function ($server) {
|
||||
$server->delete();
|
||||
});
|
||||
|
||||
$user->payments()->chunk(10, function ($payments) {
|
||||
foreach ($payments as $payment) {
|
||||
$payment->delete();
|
||||
}
|
||||
});
|
||||
$user->payments()->delete();
|
||||
|
||||
$user->tickets()->chunk(10, function ($tickets) {
|
||||
foreach ($tickets as $ticket) {
|
||||
$ticket->delete();
|
||||
}
|
||||
});
|
||||
$user->tickets()->delete();
|
||||
|
||||
$user->ticketBlackList()->delete();
|
||||
|
||||
|
@ -238,17 +233,17 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
public function getAvatar()
|
||||
{
|
||||
//TODO loading the images to confirm they exist is causing to much load time. alternative has to be found :) maybe onerror tag on the <img tags>
|
||||
// if ($this->discordUser()->exists()) {
|
||||
// if(@getimagesize($this->discordUser->getAvatar())) {
|
||||
// $avatar = $this->discordUser->getAvatar();
|
||||
// } else {
|
||||
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
// }
|
||||
// } else {
|
||||
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
// }
|
||||
// if ($this->discordUser()->exists()) {
|
||||
// if(@getimagesize($this->discordUser->getAvatar())) {
|
||||
// $avatar = $this->discordUser->getAvatar();
|
||||
// } else {
|
||||
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
// }
|
||||
// } else {
|
||||
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
// }
|
||||
|
||||
return 'https://www.gravatar.com/avatar/'.md5(strtolower(trim($this->email)));
|
||||
return 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($this->email)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -291,16 +286,15 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
public function reVerifyEmail()
|
||||
{
|
||||
$this->forceFill([
|
||||
'email_verified_at' => null,
|
||||
'email_verified_at' => null
|
||||
])->save();
|
||||
}
|
||||
|
||||
public function getActivitylogOptions(): LogOptions
|
||||
{
|
||||
return LogOptions::defaults()
|
||||
-> logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
|
||||
-> logOnlyDirty()
|
||||
-> dontSubmitEmptyLogs();
|
||||
->logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
|
||||
->logOnlyDirty()
|
||||
->dontSubmitEmptyLogs();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use App\Models\Settings;
|
||||
use App\Models\UsefulLink;
|
||||
use Exception;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
@ -45,14 +46,23 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
//if none of result array is true. it sets ok to false
|
||||
if (! in_array(true, $result)) {
|
||||
if (!in_array(true, $result)) {
|
||||
$ok = false;
|
||||
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of '.implode(',', $parameters)]);
|
||||
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of ' . implode(',', $parameters)]);
|
||||
}
|
||||
|
||||
return $ok;
|
||||
});
|
||||
|
||||
try {
|
||||
if (Schema::hasColumn('useful_links', 'position')) {
|
||||
$useful_links = UsefulLink::where("position", "like", "%topbar%")->get()->sortby("id");
|
||||
view()->share('useful_links', $useful_links);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Log::error("Couldnt find useful_links. Probably the installation is not completet. " . $e);
|
||||
}
|
||||
|
||||
//only run if the installer has been executed
|
||||
try {
|
||||
$settings = Settings::all();
|
||||
|
@ -61,12 +71,14 @@ class AppServiceProvider extends ServiceProvider
|
|||
config([$setting->key => $setting->value]);
|
||||
}
|
||||
|
||||
if(!file_exists(base_path('themes')."/".config("SETTINGS::SYSTEM:THEME"))){
|
||||
if (!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))) {
|
||||
config(['SETTINGS::SYSTEM:THEME' => "default"]);
|
||||
}
|
||||
|
||||
if(config('theme.active') == null){
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default");
|
||||
if (config('SETTINGS::SYSTEM:THEME') && config('SETTINGS::SYSTEM:THEME') !== config('theme.active')) {
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME", "default"), "default");
|
||||
} else {
|
||||
Theme::set("default", "default");
|
||||
}
|
||||
|
||||
// Set Mail Config
|
||||
|
@ -116,7 +128,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
try {
|
||||
$stringfromfile = file(base_path().'/.git/HEAD');
|
||||
$stringfromfile = file(base_path() . '/.git/HEAD');
|
||||
|
||||
$firstLine = $stringfromfile[0]; //get the string from the array
|
||||
|
||||
|
@ -125,7 +137,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
$branchname = $explodedstring[2]; //get the one that is always the branch name
|
||||
} catch (Exception $e) {
|
||||
$branchname = 'unknown';
|
||||
Log::error($e);
|
||||
Log::notice($e);
|
||||
}
|
||||
config(['BRANCHNAME' => $branchname]);
|
||||
|
||||
|
|
|
@ -7,11 +7,12 @@ use App\Events\UserUpdateCreditsEvent;
|
|||
use App\Listeners\CreateInvoice;
|
||||
use App\Listeners\UnsuspendServers;
|
||||
use App\Listeners\UserPayment;
|
||||
use App\Listeners\Verified;
|
||||
use App\Listeners\Verified as VerifiedListener;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -35,8 +36,8 @@ class EventServiceProvider extends ServiceProvider
|
|||
// ... other providers
|
||||
'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
|
||||
],
|
||||
'Illuminate\Auth\Events\Verified' => [
|
||||
Verified::class,
|
||||
Verified::class => [
|
||||
VerifiedListener::class,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
23
app/Traits/Referral.php
Normal file
23
app/Traits/Referral.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
||||
trait Referral
|
||||
{
|
||||
public function createReferralCode()
|
||||
{
|
||||
$code = Str::random(8);
|
||||
|
||||
// check if code already exists
|
||||
if (User::where('referral_code', $code)->exists()) {
|
||||
// if exists, generate another code
|
||||
return $this->generateReferralCode();
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
}
|
361
composer.lock
generated
361
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "be76c9bab8622d363a4eb843794e9e3e",
|
||||
"content-hash": "d98e4be75e05c71049fe452b69b54901",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-crt-php",
|
||||
|
@ -58,16 +58,16 @@
|
|||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.255.9",
|
||||
"version": "3.257.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296"
|
||||
"reference": "c600a07da531d6c29af791b9d2e8b6df796aa14b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a001ab98b9e76a6f5cae327b3316b08fab37a296",
|
||||
"reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c600a07da531d6c29af791b9d2e8b6df796aa14b",
|
||||
"reference": "c600a07da531d6c29af791b9d2e8b6df796aa14b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -146,9 +146,9 @@
|
|||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.255.9"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.257.5"
|
||||
},
|
||||
"time": "2023-01-04T19:24:09+00:00"
|
||||
"time": "2023-01-20T19:34:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-dompdf",
|
||||
|
@ -524,16 +524,16 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/dbal",
|
||||
"version": "3.5.2",
|
||||
"version": "3.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/dbal.git",
|
||||
"reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85"
|
||||
"reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/63e513cebbbaf96a6795e5c5ee34d205831bfc85",
|
||||
"reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/88fa7e5189fd5ec6682477044264dc0ed4e3aa1e",
|
||||
"reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -548,7 +548,7 @@
|
|||
"require-dev": {
|
||||
"doctrine/coding-standard": "11.0.0",
|
||||
"jetbrains/phpstorm-stubs": "2022.3",
|
||||
"phpstan/phpstan": "1.9.2",
|
||||
"phpstan/phpstan": "1.9.4",
|
||||
"phpstan/phpstan-strict-rules": "^1.4",
|
||||
"phpunit/phpunit": "9.5.27",
|
||||
"psalm/plugin-phpunit": "0.18.4",
|
||||
|
@ -615,7 +615,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/dbal/issues",
|
||||
"source": "https://github.com/doctrine/dbal/tree/3.5.2"
|
||||
"source": "https://github.com/doctrine/dbal/tree/3.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -631,7 +631,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-19T08:17:34+00:00"
|
||||
"time": "2023-01-12T10:21:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
|
@ -860,28 +860,27 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"version": "2.1.0",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/lexer.git",
|
||||
"reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124"
|
||||
"reference": "84a527db05647743d50373e0ec53a152f2cde568"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124",
|
||||
"reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124",
|
||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568",
|
||||
"reference": "84a527db05647743d50373e0ec53a152f2cde568",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/deprecations": "^1.0",
|
||||
"php": "^7.1 || ^8.0"
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^9 || ^10",
|
||||
"phpstan/phpstan": "^1.3",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"doctrine/coding-standard": "^10",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"psalm/plugin-phpunit": "^0.18.3",
|
||||
"vimeo/psalm": "^4.11 || ^5.0"
|
||||
"vimeo/psalm": "^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
@ -918,7 +917,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/lexer/issues",
|
||||
"source": "https://github.com/doctrine/lexer/tree/2.1.0"
|
||||
"source": "https://github.com/doctrine/lexer/tree/3.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -934,7 +933,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-14T08:49:07+00:00"
|
||||
"time": "2022-12-15T16:57:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/dompdf",
|
||||
|
@ -1061,26 +1060,26 @@
|
|||
},
|
||||
{
|
||||
"name": "egulias/email-validator",
|
||||
"version": "3.2.5",
|
||||
"version": "4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/egulias/EmailValidator.git",
|
||||
"reference": "b531a2311709443320c786feb4519cfaf94af796"
|
||||
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796",
|
||||
"reference": "b531a2311709443320c786feb4519cfaf94af796",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff",
|
||||
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/lexer": "^1.2|^2",
|
||||
"php": ">=7.2",
|
||||
"symfony/polyfill-intl-idn": "^1.15"
|
||||
"doctrine/lexer": "^2.0 || ^3.0",
|
||||
"php": ">=8.1",
|
||||
"symfony/polyfill-intl-idn": "^1.26"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.8|^9.3.3",
|
||||
"vimeo/psalm": "^4"
|
||||
"phpunit/phpunit": "^9.5.27",
|
||||
"vimeo/psalm": "^4.30"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
|
||||
|
@ -1088,7 +1087,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0.x-dev"
|
||||
"dev-master": "4.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1116,7 +1115,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/egulias/EmailValidator/issues",
|
||||
"source": "https://github.com/egulias/EmailValidator/tree/3.2.5"
|
||||
"source": "https://github.com/egulias/EmailValidator/tree/4.0.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1124,7 +1123,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-01-02T17:26:14+00:00"
|
||||
"time": "2023-01-14T14:17:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "facade/ignition-contracts",
|
||||
|
@ -1702,29 +1701,29 @@
|
|||
},
|
||||
{
|
||||
"name": "kkomelin/laravel-translatable-string-exporter",
|
||||
"version": "1.17.0",
|
||||
"version": "1.18.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kkomelin/laravel-translatable-string-exporter.git",
|
||||
"reference": "0425f2c3add32df852c002b11bffe72c9c67ec89"
|
||||
"reference": "c8b3364816d9f0ad2865c7538d8eb29ed8319136"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/0425f2c3add32df852c002b11bffe72c9c67ec89",
|
||||
"reference": "0425f2c3add32df852c002b11bffe72c9c67ec89",
|
||||
"url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/c8b3364816d9f0ad2865c7538d8eb29ed8319136",
|
||||
"reference": "c8b3364816d9f0ad2865c7538d8eb29ed8319136",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"illuminate/support": "^5.4|^6|^7|^8|^9",
|
||||
"illuminate/translation": "^5.4|^6|^7|^8|^9",
|
||||
"php": "^7.2|^8.0",
|
||||
"symfony/finder": "^3.2|^4|^5|^6"
|
||||
"illuminate/support": "^8|^9",
|
||||
"illuminate/translation": "^8|^9",
|
||||
"php": "^8.0",
|
||||
"symfony/finder": "^5|^6"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^1.0|^2.0",
|
||||
"orchestra/testbench": "^3.4|^4.0|^5.0|^6.0|^7.0",
|
||||
"phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0"
|
||||
"orchestra/testbench": "^6.0|^7.0",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -1761,28 +1760,29 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/kkomelin/laravel-translatable-string-exporter/issues",
|
||||
"source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.17.0"
|
||||
"source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.18.0"
|
||||
},
|
||||
"time": "2022-06-13T07:13:55+00:00"
|
||||
"time": "2023-01-12T15:11:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v9.46.0",
|
||||
"version": "v9.48.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "62b05b6de5733d89378a279e40230a71e5ab5d92"
|
||||
"reference": "c78ae7aeb0cbcb1a205050d3592247ba07f5b711"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/62b05b6de5733d89378a279e40230a71e5ab5d92",
|
||||
"reference": "62b05b6de5733d89378a279e40230a71e5ab5d92",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/c78ae7aeb0cbcb1a205050d3592247ba07f5b711",
|
||||
"reference": "c78ae7aeb0cbcb1a205050d3592247ba07f5b711",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brick/math": "^0.10.2",
|
||||
"doctrine/inflector": "^2.0",
|
||||
"dragonmantank/cron-expression": "^3.3.2",
|
||||
"egulias/email-validator": "^3.2.1",
|
||||
"egulias/email-validator": "^3.2.1|^4.0",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"fruitcake/php-cors": "^1.2",
|
||||
|
@ -1867,10 +1867,12 @@
|
|||
"mockery/mockery": "^1.5.1",
|
||||
"orchestra/testbench-core": "^7.16",
|
||||
"pda/pheanstalk": "^4.0",
|
||||
"phpstan/phpdoc-parser": "^1.15",
|
||||
"phpstan/phpstan": "^1.4.7",
|
||||
"phpunit/phpunit": "^9.5.8",
|
||||
"predis/predis": "^1.1.9|^2.0.2",
|
||||
"symfony/cache": "^6.0"
|
||||
"symfony/cache": "^6.0",
|
||||
"symfony/http-client": "^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
|
||||
|
@ -1949,7 +1951,7 @@
|
|||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2023-01-03T15:12:31+00:00"
|
||||
"time": "2023-01-17T15:06:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
|
@ -2013,30 +2015,30 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/socialite",
|
||||
"version": "v5.5.7",
|
||||
"version": "v5.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/socialite.git",
|
||||
"reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2"
|
||||
"reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/socialite/zipball/ee6201f539ac47c3a55132449f9d20ee928f0ee2",
|
||||
"reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2",
|
||||
"url": "https://api.github.com/repos/laravel/socialite/zipball/a14a177f2cc71d8add71e2b19e00800e83bdda09",
|
||||
"reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/guzzle": "^6.0|^7.0",
|
||||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/http": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"league/oauth1-client": "^1.10.1",
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
|
||||
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0",
|
||||
"phpunit/phpunit": "^8.0|^9.3"
|
||||
},
|
||||
"type": "library",
|
||||
|
@ -2078,26 +2080,26 @@
|
|||
"issues": "https://github.com/laravel/socialite/issues",
|
||||
"source": "https://github.com/laravel/socialite"
|
||||
},
|
||||
"time": "2022-12-28T12:35:23+00:00"
|
||||
"time": "2023-01-20T15:42:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
"version": "v2.7.3",
|
||||
"version": "v2.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/tinker.git",
|
||||
"reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef"
|
||||
"reference": "74d0b287cc4ae65d15c368dd697aae71d62a73ad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/tinker/zipball/5062061b4924af3392225dd482ca7b4d85d8b8ef",
|
||||
"reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef",
|
||||
"url": "https://api.github.com/repos/laravel/tinker/zipball/74d0b287cc4ae65d15c368dd697aae71d62a73ad",
|
||||
"reference": "74d0b287cc4ae65d15c368dd697aae71d62a73ad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"php": "^7.2.5|^8.0",
|
||||
"psy/psysh": "^0.10.4|^0.11.1",
|
||||
"symfony/var-dumper": "^4.3.4|^5.0|^6.0"
|
||||
|
@ -2107,7 +2109,7 @@
|
|||
"phpunit/phpunit": "^8.5.8|^9.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)."
|
||||
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -2144,9 +2146,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/tinker/issues",
|
||||
"source": "https://github.com/laravel/tinker/tree/v2.7.3"
|
||||
"source": "https://github.com/laravel/tinker/tree/v2.8.0"
|
||||
},
|
||||
"time": "2022-11-09T15:11:38+00:00"
|
||||
"time": "2023-01-10T18:03:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/ui",
|
||||
|
@ -2465,16 +2467,16 @@
|
|||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.12.0",
|
||||
"version": "3.12.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76"
|
||||
"reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2aef65a47e44f2d6f9938f720f6dd697e7ba7b76",
|
||||
"reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f6377c709d2275ed6feaf63e44be7a7162b0e77f",
|
||||
"reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2491,7 +2493,7 @@
|
|||
"require-dev": {
|
||||
"async-aws/s3": "^1.5",
|
||||
"async-aws/simple-s3": "^1.1",
|
||||
"aws/aws-sdk-php": "^3.198.1",
|
||||
"aws/aws-sdk-php": "^3.220.0",
|
||||
"composer/semver": "^3.0",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-ftp": "*",
|
||||
|
@ -2536,7 +2538,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.12.0"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.12.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -2552,24 +2554,24 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-20T20:21:10+00:00"
|
||||
"time": "2023-01-19T12:02:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-aws-s3-v3",
|
||||
"version": "3.10.3",
|
||||
"version": "3.12.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
|
||||
"reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640"
|
||||
"reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/f593bf91f94f2adf4f71513d29f1dfa693f2f640",
|
||||
"reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/645e14e4a80bd2da8b01e57388e7296a695a80c2",
|
||||
"reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"aws/aws-sdk-php": "^3.132.4",
|
||||
"aws/aws-sdk-php": "^3.220.0",
|
||||
"league/flysystem": "^3.10.0",
|
||||
"league/mime-type-detection": "^1.0.0",
|
||||
"php": "^8.0.2"
|
||||
|
@ -2606,7 +2608,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.10.3"
|
||||
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.12.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -2622,7 +2624,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-10-26T18:15:09+00:00"
|
||||
"time": "2023-01-17T14:15:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
|
@ -2990,16 +2992,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.64.1",
|
||||
"version": "2.65.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c"
|
||||
"reference": "09acf64155c16dc6f580f36569ae89344e9734a3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c",
|
||||
"reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/09acf64155c16dc6f580f36569ae89344e9734a3",
|
||||
"reference": "09acf64155c16dc6f580f36569ae89344e9734a3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3088,7 +3090,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-01-01T23:17:36+00:00"
|
||||
"time": "2023-01-06T15:55:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
|
@ -3154,16 +3156,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v3.2.8",
|
||||
"version": "v3.2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368"
|
||||
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368",
|
||||
"reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
|
||||
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3173,6 +3175,7 @@
|
|||
"nette/di": "<3.0.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"jetbrains/phpstorm-attributes": "dev-master",
|
||||
"nette/tester": "~2.0",
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"tracy/tracy": "^2.3"
|
||||
|
@ -3233,22 +3236,22 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v3.2.8"
|
||||
"source": "https://github.com/nette/utils/tree/v3.2.9"
|
||||
},
|
||||
"time": "2022-09-12T23:36:20+00:00"
|
||||
"time": "2023-01-18T03:26:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.15.2",
|
||||
"version": "v4.15.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
|
||||
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
|
||||
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
|
||||
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3289,9 +3292,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
|
||||
},
|
||||
"time": "2022-11-12T15:38:23+00:00"
|
||||
"time": "2023-01-16T22:05:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/termwind",
|
||||
|
@ -4438,16 +4441,16 @@
|
|||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "4.7.1",
|
||||
"version": "4.7.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/uuid.git",
|
||||
"reference": "a1acf96007170234a8399586a6e2ab8feba109d1"
|
||||
"reference": "433b2014e3979047db08a17a205f410ba3869cf2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/a1acf96007170234a8399586a6e2ab8feba109d1",
|
||||
"reference": "a1acf96007170234a8399586a6e2ab8feba109d1",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/433b2014e3979047db08a17a205f410ba3869cf2",
|
||||
"reference": "433b2014e3979047db08a17a205f410ba3869cf2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4514,7 +4517,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/uuid/issues",
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.7.1"
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.7.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -4526,7 +4529,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-31T22:20:34+00:00"
|
||||
"time": "2023-01-12T18:13:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sabberworm/php-css-parser",
|
||||
|
@ -4789,25 +4792,25 @@
|
|||
},
|
||||
{
|
||||
"name": "spatie/laravel-package-tools",
|
||||
"version": "1.13.8",
|
||||
"version": "1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-package-tools.git",
|
||||
"reference": "781a2f637237e69c277eb401063acf15e2b4156b"
|
||||
"reference": "9964e65c318c30577ca1b91469f739d2b381359b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/781a2f637237e69c277eb401063acf15e2b4156b",
|
||||
"reference": "781a2f637237e69c277eb401063acf15e2b4156b",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9964e65c318c30577ca1b91469f739d2b381359b",
|
||||
"reference": "9964e65c318c30577ca1b91469f739d2b381359b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^9.28",
|
||||
"illuminate/contracts": "^9.28|^10.0",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.5",
|
||||
"orchestra/testbench": "^7.7",
|
||||
"orchestra/testbench": "^7.7|^8.0",
|
||||
"pestphp/pest": "^1.22",
|
||||
"phpunit/phpunit": "^9.5.24",
|
||||
"spatie/pest-plugin-test-time": "^1.1"
|
||||
|
@ -4837,7 +4840,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/laravel-package-tools/issues",
|
||||
"source": "https://github.com/spatie/laravel-package-tools/tree/1.13.8"
|
||||
"source": "https://github.com/spatie/laravel-package-tools/tree/1.14.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -4845,7 +4848,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-20T14:09:05+00:00"
|
||||
"time": "2023-01-10T14:09:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-query-builder",
|
||||
|
@ -5663,16 +5666,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-client-contracts",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-client-contracts.git",
|
||||
"reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800"
|
||||
"reference": "c5f587eb445224ddfeb05b5ee703476742d730bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/fd038f08c623ab5d22b26e9ba35afe8c79071800",
|
||||
"reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800",
|
||||
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/c5f587eb445224ddfeb05b5ee703476742d730bf",
|
||||
"reference": "c5f587eb445224ddfeb05b5ee703476742d730bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5684,7 +5687,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.1-dev"
|
||||
"dev-main": "3.3-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
@ -5724,7 +5727,7 @@
|
|||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-client-contracts/tree/v3.1.1"
|
||||
"source": "https://github.com/symfony/http-client-contracts/tree/v3.2.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -5740,7 +5743,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-04-22T07:30:54+00:00"
|
||||
"time": "2022-11-25T10:21:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
|
@ -6014,28 +6017,29 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/mailer",
|
||||
"version": "v6.2.2",
|
||||
"version": "6.3.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mailer.git",
|
||||
"reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6"
|
||||
"reference": "de3acc2fbc81d26957b551aabeea8b6cb0dc1f72"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/b355ad81f1d2987c47dcd3b04d5dce669e1e62e6",
|
||||
"reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/de3acc2fbc81d26957b551aabeea8b6cb0dc1f72",
|
||||
"reference": "de3acc2fbc81d26957b551aabeea8b6cb0dc1f72",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"egulias/email-validator": "^2.1.10|^3",
|
||||
"egulias/email-validator": "^2.1.10|^3|^4",
|
||||
"php": ">=8.1",
|
||||
"psr/event-dispatcher": "^1",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0",
|
||||
"symfony/mime": "^6.2",
|
||||
"symfony/service-contracts": "^1.1|^2|^3"
|
||||
"symfony/service-contracts": "^2.5|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/http-client-contracts": "<2.5",
|
||||
"symfony/http-kernel": "<5.4",
|
||||
"symfony/messenger": "<6.2",
|
||||
"symfony/mime": "<6.2",
|
||||
|
@ -6043,7 +6047,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"symfony/console": "^5.4|^6.0",
|
||||
"symfony/http-client-contracts": "^1.1|^2|^3",
|
||||
"symfony/http-client-contracts": "^2.5|^3",
|
||||
"symfony/messenger": "^6.2",
|
||||
"symfony/twig-bridge": "^6.2"
|
||||
},
|
||||
|
@ -6073,7 +6077,7 @@
|
|||
"description": "Helps sending emails",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mailer/tree/v6.2.2"
|
||||
"source": "https://github.com/symfony/mailer/tree/6.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -6089,7 +6093,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-14T16:11:27+00:00"
|
||||
"time": "2023-01-23T14:48:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailgun-mailer",
|
||||
|
@ -8000,30 +8004,30 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.5.0",
|
||||
"version": "2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
|
||||
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
|
||||
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
|
||||
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^9 || ^11",
|
||||
"doctrine/coding-standard": "^11",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpbench/phpbench": "^0.16 || ^1",
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"phpstan/phpstan-phpunit": "^1",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"vimeo/psalm": "^4.30 || ^5.4"
|
||||
"phpbench/phpbench": "^1.2",
|
||||
"phpstan/phpstan": "^1.9.4",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpunit/phpunit": "^9.5.27",
|
||||
"vimeo/psalm": "^5.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
@ -8050,7 +8054,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/instantiator/issues",
|
||||
"source": "https://github.com/doctrine/instantiator/tree/1.5.0"
|
||||
"source": "https://github.com/doctrine/instantiator/tree/2.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -8066,7 +8070,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-30T00:15:36+00:00"
|
||||
"time": "2022-12-30T00:23:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fakerphp/faker",
|
||||
|
@ -8260,22 +8264,22 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
"version": "v1.17.0",
|
||||
"version": "v1.18.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sail.git",
|
||||
"reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80"
|
||||
"reference": "a64f78a4ab86c04a4c5de39bea20a8d36ad48a22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sail/zipball/7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80",
|
||||
"reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80",
|
||||
"url": "https://api.github.com/repos/laravel/sail/zipball/a64f78a4ab86c04a4c5de39bea20a8d36ad48a22",
|
||||
"reference": "a64f78a4ab86c04a4c5de39bea20a8d36ad48a22",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^8.0|^9.0",
|
||||
"illuminate/contracts": "^8.0|^9.0",
|
||||
"illuminate/support": "^8.0|^9.0",
|
||||
"illuminate/console": "^8.0|^9.0|^10.0",
|
||||
"illuminate/contracts": "^8.0|^9.0|^10.0",
|
||||
"illuminate/support": "^8.0|^9.0|^10.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"bin": [
|
||||
|
@ -8316,7 +8320,7 @@
|
|||
"issues": "https://github.com/laravel/sail/issues",
|
||||
"source": "https://github.com/laravel/sail"
|
||||
},
|
||||
"time": "2022-12-22T14:46:08+00:00"
|
||||
"time": "2023-01-11T14:35:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
|
@ -9034,20 +9038,20 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.5.27",
|
||||
"version": "9.5.28",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
|
||||
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
|
||||
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e",
|
||||
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.3.1",
|
||||
"doctrine/instantiator": "^1.3.1 || ^2",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
|
@ -9116,7 +9120,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -9132,7 +9136,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-09T07:31:23+00:00"
|
||||
"time": "2023-01-14T12:32:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@ -10162,16 +10166,16 @@
|
|||
},
|
||||
{
|
||||
"name": "spatie/flare-client-php",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/flare-client-php.git",
|
||||
"reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868"
|
||||
"reference": "f5aea0629d1fff794b2aabbcd483bd83824b112f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/609903bd154ba3d71f5e23a91c3b431fa8f71868",
|
||||
"reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868",
|
||||
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/f5aea0629d1fff794b2aabbcd483bd83824b112f",
|
||||
"reference": "f5aea0629d1fff794b2aabbcd483bd83824b112f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -10219,7 +10223,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/flare-client-php/issues",
|
||||
"source": "https://github.com/spatie/flare-client-php/tree/1.3.2"
|
||||
"source": "https://github.com/spatie/flare-client-php/tree/1.3.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -10227,20 +10231,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-26T14:36:46+00:00"
|
||||
"time": "2022-12-26T14:37:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/ignition",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/ignition.git",
|
||||
"reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1"
|
||||
"reference": "79a2eedbfa88955bb41411e61f7db9134c9a6a82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/dd3d456779108d7078baf4e43f8c2b937d9794a1",
|
||||
"reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1",
|
||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/79a2eedbfa88955bb41411e61f7db9134c9a6a82",
|
||||
"reference": "79a2eedbfa88955bb41411e61f7db9134c9a6a82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -10302,7 +10306,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-08-26T11:51:15+00:00"
|
||||
"time": "2023-01-23T15:14:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-ignition",
|
||||
|
@ -10451,9 +10455,12 @@
|
|||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.0|^7.4",
|
||||
"php": "^8.1",
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "8.1"
|
||||
},
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade;
|
|||
|
||||
return [
|
||||
|
||||
'version' => '0.9',
|
||||
'version' => '0.9.8',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -17,7 +17,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Controlpanel.gg'),
|
||||
'name' => env('APP_NAME', 'Ctrlpanel.gg'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -9,7 +9,7 @@ return [
|
|||
| It will assign the default active theme to be used if one is not set during
|
||||
| runtime.
|
||||
*/
|
||||
'active' => null,
|
||||
'active' => "default",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -14,7 +14,7 @@ return [
|
|||
*/
|
||||
|
||||
'paths' => [
|
||||
resource_path('views'),
|
||||
base_path('themes'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Traits\Referral;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
@ -9,16 +10,13 @@ use Illuminate\Support\Str;
|
|||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function generateCode($userid)
|
||||
use Referral;
|
||||
public function setReferralCode($userid)
|
||||
{
|
||||
$random = STR::random(8);
|
||||
if (User::where('referral_code', '=', $random)->doesntExist()) {
|
||||
DB::table('users')
|
||||
->where('id', '=', $userid)
|
||||
->update(['referral_code' => $random]);
|
||||
} else {
|
||||
$this->generateCode($userid);
|
||||
}
|
||||
$code = $this->createReferralCode();
|
||||
DB::table('users')
|
||||
->where('id', '=', $userid)
|
||||
->update(['referral_code' => $code]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +33,7 @@ return new class extends Migration
|
|||
$existing_user = User::where('referral_code', '')->orWhere('referral_code', null)->get();
|
||||
|
||||
foreach ($existing_user as $user) {
|
||||
$this->generateCode($user->id);
|
||||
$this->setReferralCode($user->id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('useful_links', function (Blueprint $table) {
|
||||
$table->string('position')->after("description")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('useful_links', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
|
@ -131,7 +131,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'Credits',
|
||||
'type' => 'string',
|
||||
'description' => 'Set the display name of your currency :)',
|
||||
'description' => 'The display name of your currency.',
|
||||
]);
|
||||
|
||||
//credits display name
|
||||
|
@ -148,7 +148,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '0',
|
||||
'type' => 'integer',
|
||||
'description' => 'The %-value of tax that will be added to the product price on checkout',
|
||||
'description' => 'The %-value of tax that will be added to the product price on checkout.',
|
||||
]);
|
||||
//Invoices enabled
|
||||
Settings::firstOrCreate([
|
||||
|
@ -156,7 +156,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'false',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enables or disables the invoice feature for payments',
|
||||
'description' => 'Enables or disables the invoice feature for payments.',
|
||||
]);
|
||||
//Invoice company name
|
||||
Settings::firstOrCreate([
|
||||
|
@ -164,7 +164,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The name of the Company on the Invoices',
|
||||
'description' => 'The name of the Company on the Invoices.',
|
||||
]);
|
||||
//Invoice company address
|
||||
Settings::firstOrCreate([
|
||||
|
@ -172,7 +172,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The address of the Company on the Invoices',
|
||||
'description' => 'The address of the Company on the Invoices.',
|
||||
]);
|
||||
//Invoice company phone
|
||||
Settings::firstOrCreate([
|
||||
|
@ -180,7 +180,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The phone number of the Company on the Invoices',
|
||||
'description' => 'The phone number of the Company on the Invoices.',
|
||||
]);
|
||||
|
||||
//Invoice company mail
|
||||
|
@ -189,7 +189,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The email address of the Company on the Invoices',
|
||||
'description' => 'The email address of the Company on the Invoices.',
|
||||
]);
|
||||
|
||||
//Invoice VAT
|
||||
|
@ -198,7 +198,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The VAT-Number of the Company on the Invoices',
|
||||
'description' => 'The VAT-Number of the Company on the Invoices.',
|
||||
]);
|
||||
|
||||
//Invoice Website
|
||||
|
@ -207,7 +207,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The Website of the Company on the Invoices',
|
||||
'description' => 'The Website of the Company on the Invoices.',
|
||||
]);
|
||||
|
||||
//Invoice Website
|
||||
|
@ -216,7 +216,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'INV',
|
||||
'type' => 'string',
|
||||
'description' => 'The invoice prefix',
|
||||
'description' => 'The invoice prefix.',
|
||||
]);
|
||||
|
||||
//Locale
|
||||
|
@ -225,7 +225,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'en',
|
||||
'type' => 'string',
|
||||
'description' => 'The default Language the dashboard will be shown in',
|
||||
'description' => 'The default dashboard language.',
|
||||
]);
|
||||
//Dynamic locale
|
||||
Settings::firstOrCreate([
|
||||
|
@ -247,9 +247,9 @@ class SettingsSeeder extends Seeder
|
|||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::LOCALE:AVAILABLE',
|
||||
], [
|
||||
'value' => '',
|
||||
'value' => 'en',
|
||||
'type' => 'string',
|
||||
'description' => 'The available languages',
|
||||
'description' => 'The available languages.',
|
||||
]);
|
||||
//Locale
|
||||
Settings::firstOrCreate([
|
||||
|
@ -265,63 +265,63 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('PAYPAL_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your PayPal Secret-Key ( https://developer.paypal.com/docs/integration/direct/rest/)',
|
||||
'description' => 'Your PayPal Secret-Key (https://developer.paypal.com/docs/integration/direct/rest/).',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID',
|
||||
], [
|
||||
'value' => env('PAYPAL_CLIENT_ID', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your PayPal Client_ID',
|
||||
'description' => 'Your PayPal Client_ID.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET',
|
||||
], [
|
||||
'value' => env('PAYPAL_SANDBOX_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your PayPal SANDBOX Secret-Key used for testing ',
|
||||
'description' => 'Your PayPal SANDBOX Secret-Key used for testing.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID',
|
||||
], [
|
||||
'value' => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your PayPal SANDBOX Client-ID used for testing ',
|
||||
'description' => 'Your PayPal SANDBOX Client-ID used for testing.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:STRIPE:SECRET',
|
||||
], [
|
||||
'value' => env('STRIPE_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your Stripe Secret-Key ( https://dashboard.stripe.com/account/apikeys )',
|
||||
'description' => 'Your Stripe Secret-Key (https://dashboard.stripe.com/account/apikeys).',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET',
|
||||
], [
|
||||
'value' => env('STRIPE_ENDPOINT_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your Stripe endpoint secret-key',
|
||||
'description' => 'Your Stripe endpoint secret-key.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET',
|
||||
], [
|
||||
'value' => env('STRIPE_TEST_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your Stripe test secret-key',
|
||||
'description' => 'Your Stripe test secret-key.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET',
|
||||
], [
|
||||
'value' => env('STRIPE_ENDPOINT_TEST_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Your Stripe endpoint test secret-key',
|
||||
'description' => 'Your Stripe endpoint test secret-key.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::PAYMENTS:STRIPE:METHODS',
|
||||
], [
|
||||
'value' => env('STRIPE_METHODS', 'card,sepa_debit'),
|
||||
'type' => 'string',
|
||||
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options)',
|
||||
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options).',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -329,7 +329,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('DISCORD_CLIENT_ID', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
|
||||
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -337,14 +337,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('DISCORD_CLIENT_SECRET', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
|
||||
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::DISCORD:BOT_TOKEN',
|
||||
], [
|
||||
'value' => env('DISCORD_BOT_TOKEN', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
|
||||
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -352,7 +352,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('DISCORD_GUILD_ID', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
|
||||
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -360,14 +360,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('DISCORD_ROLE_ID', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Discord role that will be assigned to users when they register',
|
||||
'description' => 'Discord role that will be assigned to users when they register.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::DISCORD:INVITE_URL',
|
||||
], [
|
||||
'value' => env('DISCORD_INVITE_URL', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'The invite URL to your Discord Server',
|
||||
'description' => 'The invite URL to your Discord Server.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -404,7 +404,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('RECAPTCHA_SITE_KEY', '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI'),
|
||||
'type' => 'string',
|
||||
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
|
||||
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -412,14 +412,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('RECAPTCHA_SECRET_KEY', '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'),
|
||||
'type' => 'string',
|
||||
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
|
||||
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::RECAPTCHA:ENABLED',
|
||||
], [
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page',
|
||||
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page.',
|
||||
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
|
@ -427,63 +427,63 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => env('MAIL_MAILER', 'smtp'),
|
||||
'type' => 'string',
|
||||
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap)',
|
||||
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap).',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:HOST',
|
||||
], [
|
||||
'value' => env('MAIL_HOST', 'localhost'),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer Host Address',
|
||||
'description' => 'Mailer Host Address.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:PORT',
|
||||
], [
|
||||
'value' => env('MAIL_PORT', '25'),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer Server Port',
|
||||
'description' => 'Mailer Server Port.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:USERNAME',
|
||||
], [
|
||||
'value' => env('MAIL_USERNAME', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer Username',
|
||||
'description' => 'Mailer Username.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:PASSWORD',
|
||||
], [
|
||||
'value' => env('MAIL_PASSWORD', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer Password',
|
||||
'description' => 'Mailer Password.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:ENCRYPTION',
|
||||
], [
|
||||
'value' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer Encryption (tls, ssl)',
|
||||
'description' => 'Mailer Encryption (tls, ssl).',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:FROM_ADDRESS',
|
||||
], [
|
||||
'value' => env('MAIL_FROM_ADDRESS', ''),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer From Address',
|
||||
'description' => 'Mailer From Address.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:FROM_NAME',
|
||||
], [
|
||||
'value' => env('APP_NAME', 'Controlpanel'),
|
||||
'value' => env('APP_NAME', 'Ctrlpanel'),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer From Name',
|
||||
'description' => 'Mailer From Name.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::REFERRAL::ENABLED',
|
||||
], [
|
||||
'value' => 'false',
|
||||
'type' => 'string',
|
||||
'description' => 'Enable or disable the referral system',
|
||||
'description' => 'Enable or disable the referral system.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION',
|
||||
|
@ -518,7 +518,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 100,
|
||||
'type' => 'integer',
|
||||
'description' => 'The Percentage Value a referred user gets',
|
||||
'description' => 'The Percentage value a referred user gets.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -526,28 +526,28 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'string',
|
||||
'description' => 'The Client API Key of an Pterodactyl Admin Account',
|
||||
'description' => 'The Client API Key of an Pterodactyl Admin Account.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:ENABLE_UPGRADE',
|
||||
], [
|
||||
'value' => 'false',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enables the updgrade/downgrade feature for servers',
|
||||
'description' => 'Enables the updgrade/downgrade feature for servers.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS',
|
||||
], [
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable the creation of new servers',
|
||||
'description' => 'Enable creation of new servers',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS',
|
||||
], [
|
||||
'value' => 'false',
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable the creation of new users',
|
||||
'description' => 'Enable creation of new users',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:SHOW_IMPRINT',
|
||||
|
@ -555,7 +555,7 @@ class SettingsSeeder extends Seeder
|
|||
|
||||
'value' => "false",
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable imprint in footer'
|
||||
'description' => 'Enable imprint in footer.'
|
||||
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
|
@ -564,7 +564,7 @@ class SettingsSeeder extends Seeder
|
|||
|
||||
'value' => "false",
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable privacy policy in footer'
|
||||
'description' => 'Enable privacy policy in footer.'
|
||||
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
|
@ -572,7 +572,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'false',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable Terms of Service in footer',
|
||||
'description' => 'Enable Terms of Service in footer.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -580,14 +580,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'false',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable Alerts on Homepage',
|
||||
'description' => 'Enable Alerts on Homepage.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:ALERT_TYPE',
|
||||
], [
|
||||
'value' => 'dark',
|
||||
'type' => 'text',
|
||||
'description' => 'Changes the Color of the Alert',
|
||||
'description' => 'Changes the Color of the Alert.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -595,14 +595,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => '',
|
||||
'type' => 'text',
|
||||
'description' => 'Changes the Content the Alert',
|
||||
'description' => 'Changes the Content the Alert.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:THEME',
|
||||
], [
|
||||
'value' => 'default',
|
||||
'type' => 'text',
|
||||
'description' => 'Current active theme',
|
||||
'description' => 'Current active theme.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -610,7 +610,7 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable Useful Links on Homepage',
|
||||
'description' => 'Enable Useful Links on Homepage.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -618,24 +618,24 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Enable/disable MOTD on Homepage',
|
||||
'description' => 'Enable MOTD on Homepage.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:MOTD_MESSAGE',
|
||||
], [
|
||||
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://controlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Controlpanel.gg</span></h1>
|
||||
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://ctrlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Ctrlpanel.gg</span></h1>
|
||||
<p><span style="font-size: 18pt;">Thank you for using our Software</span></p>
|
||||
<p><span style="font-size: 18pt;">If you have any questions, make sure to join our <a href="https://discord.com/invite/4Y6HjD2uyU" target="_blank" rel="noopener">Discord</a></span></p>
|
||||
<p><span style="font-size: 10pt;">(you can change this message in the <a href="admin/settings#system">Settings</a> )</span></p>',
|
||||
'type' => 'text',
|
||||
'description' => 'MOTD Message',
|
||||
'description' => 'MOTD Message.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:SEO_TITLE',
|
||||
], [
|
||||
'value' => 'Controlpanel.gg',
|
||||
'value' => 'Ctrlpanel.gg',
|
||||
'type' => 'text',
|
||||
'description' => 'The SEO Title',
|
||||
'description' => 'The SEO Title.',
|
||||
]);
|
||||
|
||||
Settings::firstOrCreate([
|
||||
|
@ -643,14 +643,14 @@ class SettingsSeeder extends Seeder
|
|||
], [
|
||||
'value' => 'Billing software for Pterodactyl Dashboard!',
|
||||
'type' => 'text',
|
||||
'description' => 'SEO Description',
|
||||
'description' => 'SEO Description.',
|
||||
]);
|
||||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::TICKET:NOTIFY',
|
||||
], [
|
||||
'value' => 'all',
|
||||
'type' => 'text',
|
||||
'description' => 'Who will get a Email Notifcation on new Tickets',
|
||||
'description' => 'Who will get a Email Notifcation on new Tickets.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,18 +19,21 @@ class UsefulLinksSeeder extends Seeder
|
|||
'title' => 'Pterodactyl Panel',
|
||||
'link' => env('PTERODACTYL_URL', 'http://localhost'),
|
||||
'description' => 'Use your servers on our pterodactyl panel <small>(You can use the same login details)</small>',
|
||||
'position' => 'dashboard',
|
||||
]);
|
||||
UsefulLink::create([
|
||||
'icon' => 'fas fa-database',
|
||||
'title' => 'phpMyAdmin',
|
||||
'link' => env('PHPMYADMIN_URL', 'http://localhost'),
|
||||
'description' => 'View your database online using phpMyAdmin',
|
||||
'position' => 'dashboard,topbar',
|
||||
]);
|
||||
UsefulLink::create([
|
||||
'icon' => 'fab fa-discord',
|
||||
'title' => 'Discord',
|
||||
'link' => env('DISCORD_INVITE_URL', 'https://discord.gg/4Y6HjD2uyU'),
|
||||
'description' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!',
|
||||
'position' => 'dashboard',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ services:
|
|||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- "../:/var/www/html:delegated"
|
||||
- "../:/var/www/html"
|
||||
depends_on:
|
||||
- php
|
||||
- mysql
|
||||
|
@ -42,7 +42,7 @@ services:
|
|||
dockerfile: docker/php/Dockerfile
|
||||
container_name: controlpanel_php
|
||||
volumes:
|
||||
- "../:/var/www/html:delegated"
|
||||
- "../:/var/www/html"
|
||||
networks:
|
||||
- laravel
|
||||
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
FROM php:8.0-fpm-alpine3.13
|
||||
FROM php:8.1-fpm-buster
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev libicu-dev libonig-dev libpng-dev libjpeg-dev libfreetype6-dev
|
||||
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/
|
||||
|
||||
RUN apk add --no-cache curl-dev icu-dev libzip-dev
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip gd bcmath
|
||||
|
||||
ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
RUN mkdir -p /var/www/html
|
||||
|
||||
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
|
||||
RUN addgroup --gid 1000 laravel && adduser --ingroup laravel --uid 1000 --shell /bin/sh --disabled-password --gecos "" laravel
|
||||
RUN chown laravel:laravel /var/www/html
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
|
10
lang/en.json
10
lang/en.json
|
@ -160,7 +160,7 @@
|
|||
"Support server": "Support server",
|
||||
"Documentation": "Documentation",
|
||||
"Github": "Github",
|
||||
"Support ControlPanel": "Support ControlPanel",
|
||||
"Support CtrlPanel": "Support CtrlPanel",
|
||||
"Servers": "Servers",
|
||||
"Total": "Total",
|
||||
"Payments": "Payments",
|
||||
|
@ -177,13 +177,13 @@
|
|||
"Title": "Title",
|
||||
"User": "User",
|
||||
"Last updated": "Last updated",
|
||||
"Controlpanel.gg": "Controlpanel.gg",
|
||||
"Ctrlpanel.gg": "Ctrlpanel.gg",
|
||||
"Version": "Version",
|
||||
"Individual nodes": "Individual nodes",
|
||||
"You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.": "You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.",
|
||||
"You can do that in settings.": "You can do that in settings.",
|
||||
"Note": "Note",
|
||||
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.",
|
||||
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.",
|
||||
"Sync servers": "Sync servers",
|
||||
"Node": "Node",
|
||||
"Server count": "Server count",
|
||||
|
@ -256,9 +256,9 @@
|
|||
"You usually do not need to change anything here": "You usually do not need to change anything here",
|
||||
"Edit Server": "Edit Server",
|
||||
"Server identifier": "Server identifier",
|
||||
"Change the server identifier on controlpanel to match a pterodactyl server.": "Change the server identifier on controlpanel to match a pterodactyl server.",
|
||||
"Change the server identifier on ctrlpanel to match a pterodactyl server.": "Change the server identifier on ctrlpanel to match a pterodactyl server.",
|
||||
"Server owner": "Server owner",
|
||||
"Change the current server owner on controlpanel and pterodactyl.": "Change the current server owner on controlpanel and pterodactyl.",
|
||||
"Change the current server owner on ctrlpanel and pterodactyl.": "Change the current server owner on ctrlpanel and pterodactyl.",
|
||||
"Server id": "Server id",
|
||||
"Config": "Config",
|
||||
"Suspended at": "Suspended at",
|
||||
|
|
24755
package-lock.json
generated
24755
package-lock.json
generated
File diff suppressed because it is too large
Load diff
18
package.json
18
package.json
|
@ -1,23 +1,13 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "mix",
|
||||
"watch": "mix watch",
|
||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||
"hot": "mix watch --hot",
|
||||
"prod": "npm run production",
|
||||
"production": "mix --production",
|
||||
"dev:default": "vite --config themes/default/vite.config.js",
|
||||
"build:default": "vite build --config themes/default/vite.config.js",
|
||||
"dev:1day2die": "vite --config themes/1day2die/vite.config.js",
|
||||
"build:1day2die": "vite build --config themes/1day2die/vite.config.js"
|
||||
"development": "vite",
|
||||
"production": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.25",
|
||||
"bootstrap": "^4.6.0",
|
||||
"jquery": "^3.5",
|
||||
"laravel-mix": "^6.0.6",
|
||||
"lodash": "^4.17.19",
|
||||
"popper.js": "^1.16",
|
||||
"postcss": "^8.1.14",
|
||||
|
@ -26,6 +16,8 @@
|
|||
"sass-loader": "^10.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"tinymce": "^6.3.1"
|
||||
"tinymce": "^6.3.1",
|
||||
"vite": "^4.0.4",
|
||||
"laravel-vite-plugin": "^0.7.3"
|
||||
}
|
||||
}
|
||||
|
|
11
public/build/assets/app-bac23d88.css
vendored
Normal file
11
public/build/assets/app-bac23d88.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public/build/manifest.json
Normal file
7
public/build/manifest.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"themes/default/sass/app.scss": {
|
||||
"file": "assets/app-bac23d88.css",
|
||||
"src": "themes/default/sass/app.scss",
|
||||
"isEntry": true
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ if (file_exists('../../install.lock')) {
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<title>Controlpanel.gg installer Script</title>
|
||||
<title>Ctrlpanel.gg installer Script</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
<style>
|
||||
|
@ -48,7 +48,7 @@ if (file_exists('../../install.lock')) {
|
|||
$cardheader = '
|
||||
<div class="card card-outline-success bg-dark">
|
||||
<div class="card-header text-center">
|
||||
<b class="mr-1 text-light">Controlpanel.GG</b>
|
||||
<b class="mr-1 text-light">Ctrlpanel.GG</b>
|
||||
</div>
|
||||
<div class="card-body bg-light">';
|
||||
|
||||
|
@ -57,7 +57,7 @@ if (! isset($_GET['step'])) {
|
|||
echo run_console('cp .env.example .env');
|
||||
}
|
||||
echo $cardheader; ?>
|
||||
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Controlpanel.gg`s
|
||||
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Ctrlpanel.gg`s
|
||||
setup</p>
|
||||
<p class="<?php echo checkHTTPS() == true ? 'ok' : 'notok'; ?>">HTTPS is required</p>
|
||||
|
||||
|
@ -218,7 +218,7 @@ if (isset($_GET['step']) && $_GET['step'] == 2) {
|
|||
<label for="name">Your Host-Name</label>
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
value="Controlpanel.gg" class="form-control">
|
||||
value="Ctrlpanel.gg" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
1
public/themes/BlueInfinity/app.css
vendored
Normal file
1
public/themes/BlueInfinity/app.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
@import "default.css";.layout-fixed .wrapper .sidebar{ height:calc(100vh - 3.5rem - 1px);background:radial-gradient(#061b29,black);}body:not(.sidebar-mini-md) .content-wrapper,body:not(.sidebar-mini-md) .main-footer,body:not(.sidebar-mini-md) .main-header{ transition:margin-left .3s ease-in-out;background:radial-gradient(#061b29,black);}[class*=sidebar-dark] .brand-link,[class*=sidebar-dark] .brand-link .pushmenu{ color:hsla(0,0%,100%,.8);background:radial-gradient(#061b29,black);}.main-sidebar .brand-text,.main-sidebar .logo-xl,.main-sidebar .logo-xs,.sidebar .nav-link p,.sidebar .user-panel .info{ transition:margin-left .3s linear,opacity .3s ease,visibility .3s ease;color:#d3d3d3;}.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active{ color:#fff;background:radial-gradient(#1b4b61,#fd030300);border-radius:50px;}.dark-mode .card{ background-color:#00000000;color:#ffffff99;border-width:3px;border-color:#f7f7f7;border-style:double;border-radius:15px;}.btn-info{ color:#ffffff;background-color:#b8171700;border-color:#ffffff;box-shadow:none;}.btn-warning{ color:#ffffff;background-color:#ffc10700;border-color:#ffffff;box-shadow:none;}.card-title{ float:left;font-size:1.1rem;font-weight:400;margin:0;color:white;}.dark-mode .text-muted{ color:#ffffff99!important;}.dark-mode .list-group-item{ background-color:#343a4000;border-color:#ffffff99;}.dark-mode .info-box{ background-color:#343a4000;color:#fff;border:3px;border-style:double;border-radius:15px;border-color:white;}label:not(.form-check-label):not(.custom-file-label){ font-weight:700;color:#ffffffc2;}.dark-mode .custom-control-label:before,.dark-mode .custom-file-label,.dark-mode .custom-file-label:after,.dark-mode .custom-select,.dark-mode .form-control,.dark-mode .input-group-text{ background-color:#007af400;color:#828282;}.alert-success{ color:#fff;background-color:#28a745;border-color:#ffffff;border-radius:15px;border-style:double;}.dark-mode{ color:#fff;background:radial-gradient(#061b29,black);}.dark-mode .invoice{ background-color:#343a4000;border:3px;border-radius:15px;border-color:white;border:double;}.dark-mode .nav-tabs .nav-item.show .nav-link,.dark-mode .nav-tabs .nav-link.active{ background-color:#ffffff1c;color:#fff;}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{ background:black;}.dark-mode .callout{ background-color:#00ff0333;}.callout.callout-info{ border-left-color:#00e11d;}.p-3{ padding:1rem!important;background:#061b29;}.small-box>.small-box-footer{ color:hsla(0,0%,100%,.8);display:block;padding:3px 0;position:relative;text-align:center;text-decoration:none;z-index:10;background:#061b29;}.dark-mode .dropdown-menu{ background-color:#061b29;border-color:white;}.card-header:first-child{ border-radius:14px 14px 0px 0px;background:#061b29;}.card-body{ flex:1 1 auto;min-height:1px;padding:1.25rem;background:#061b29;}.justify-content-between{ justify-content:space-between!important;background:#061b29;}.dark-mode .card .card-footer{ background-color:#061b29;border-radius:0px 0px 14px 14px;}.dark-mode .select2-selection--single{ background-color:#061b29;border-color:#6c757d;}.select2-search--dropdown{ display:block;padding:4px;background:#061b29;}.select2-container--default .select2-results__option{ padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:blue;background:#061b29;}.dark-mode .select2-dropdown,.dark-mode .select2-dropdown .select2-search__field,.dark-mode .select2-search--inline .select2-search__field{ background-color:#061b29;border-color:#ffffff;color:#fff;}.modal-header{ background:#061b29;}.modal-body{ position:relative;flex:1 1 auto;padding:1rem;background:#061b29;}.dark-mode .modal-footer,.dark-mode .modal-header{ border-color:#ffffff;background:#061b29;}
|
1
public/themes/BlueInfinity/app.css.map
Normal file
1
public/themes/BlueInfinity/app.css.map
Normal file
File diff suppressed because one or more lines are too long
20
public/themes/BlueInfinity/default.css
vendored
Normal file
20
public/themes/BlueInfinity/default.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,9 @@ use App\Classes\Settings\System;
|
|||
use App\Http\Controllers\Admin\ActivityLogController;
|
||||
use App\Http\Controllers\Admin\ApplicationApiController;
|
||||
use App\Http\Controllers\Admin\InvoiceController;
|
||||
use App\Http\Controllers\Admin\LegalController;
|
||||
use App\Http\Controllers\Admin\OverViewController;
|
||||
use App\Http\Controllers\Admin\PartnerController;
|
||||
use App\Http\Controllers\Admin\PaymentController;
|
||||
use App\Http\Controllers\Admin\ProductController;
|
||||
use App\Http\Controllers\Admin\ServerController as AdminServerController;
|
||||
|
@ -19,9 +21,9 @@ use App\Http\Controllers\Admin\UserController;
|
|||
use App\Http\Controllers\Admin\VoucherController;
|
||||
use App\Http\Controllers\Auth\SocialiteController;
|
||||
use App\Http\Controllers\HomeController;
|
||||
use App\Http\Controllers\Moderation\TicketCategoryController;
|
||||
use App\Http\Controllers\Moderation\TicketsController as ModTicketsController;
|
||||
use App\Http\Controllers\NotificationController;
|
||||
use App\Http\Controllers\PartnerController;
|
||||
use App\Http\Controllers\ProductController as FrontProductController;
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use App\Http\Controllers\ServerController;
|
||||
|
@ -111,13 +113,15 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::post('ticket/new', [TicketsController::class, 'store'])->middleware(['throttle:ticket-new'])->name('ticket.new.store');
|
||||
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [TicketsController::class, 'reply'])->middleware(['throttle:ticket-reply'])->name('ticket.reply');
|
||||
Route::post('ticket/close/{ticket_id}', [TicketsController::class, 'close'])->name('ticket.close');
|
||||
Route::post('ticket/status/{ticket_id}', [TicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
|
||||
}
|
||||
|
||||
//admin
|
||||
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
|
||||
|
||||
//overview
|
||||
Route::get('legal', [OverViewController::class, 'index'])->name('overview.index');
|
||||
|
||||
Route::get('overview', [OverViewController::class, 'index'])->name('overview.index');
|
||||
Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync');
|
||||
|
||||
|
@ -178,6 +182,10 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable');
|
||||
Route::resource('usefullinks', UsefulLinkController::class);
|
||||
|
||||
//legal
|
||||
Route::get('legal', [LegalController::class, 'index'])->name('legal.index');
|
||||
Route::patch('legal', [LegalController::class, 'update'])->name('legal.update');
|
||||
|
||||
//vouchers
|
||||
Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable');
|
||||
Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable');
|
||||
|
@ -203,7 +211,7 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::get('ticket/datatable', [ModTicketsController::class, 'datatable'])->name('ticket.datatable');
|
||||
Route::get('ticket/show/{ticket_id}', [ModTicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [ModTicketsController::class, 'reply'])->name('ticket.reply');
|
||||
Route::post('ticket/close/{ticket_id}', [ModTicketsController::class, 'close'])->name('ticket.close');
|
||||
Route::post('ticket/status/{ticket_id}', [ModTicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
|
||||
Route::post('ticket/delete/{ticket_id}', [ModTicketsController::class, 'delete'])->name('ticket.delete');
|
||||
//ticket moderation blacklist
|
||||
Route::get('ticket/blacklist', [ModTicketsController::class, 'blacklist'])->name('ticket.blacklist');
|
||||
|
@ -211,6 +219,11 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::post('ticket/blacklist/delete/{id}', [ModTicketsController::class, 'blacklistDelete'])->name('ticket.blacklist.delete');
|
||||
Route::post('ticket/blacklist/change/{id}', [ModTicketsController::class, 'blacklistChange'])->name('ticket.blacklist.change');
|
||||
Route::get('ticket/blacklist/datatable', [ModTicketsController::class, 'dataTableBlacklist'])->name('ticket.blacklist.datatable');
|
||||
|
||||
|
||||
Route::get('ticket/category/datatable', [TicketCategoryController::class, 'datatable'])->name('ticket.category.datatable');
|
||||
Route::resource("ticket/category", TicketCategoryController::class,['as' => 'ticket']);
|
||||
|
||||
});
|
||||
|
||||
Route::get('/home', [HomeController::class, 'index'])->name('home');
|
||||
|
|
66
themes/BlueInfinity/views/layouts/app.blade.php
Normal file
66
themes/BlueInfinity/views/layouts/app.blade.php
Normal file
|
@ -0,0 +1,66 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
|
||||
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
|
||||
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
<link rel="icon"
|
||||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
|
||||
onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
|
||||
</noscript>
|
||||
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
|
||||
{!! htmlScriptTagJsApi() !!}
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
|
||||
</head>
|
||||
@yield('content')
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
||||
|
||||
<script>
|
||||
@if (Session::has('error'))
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Oops...',
|
||||
html: '{{ Session::get('error') }}',
|
||||
})
|
||||
@endif
|
||||
|
||||
@if (Session::has('success'))
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: '{{ Session::get('success') }}',
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
background: '#343a40',
|
||||
toast: true,
|
||||
timer: 3000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
})
|
||||
@endif
|
||||
</script>
|
||||
|
||||
</html>
|
544
themes/BlueInfinity/views/layouts/main.blade.php
Normal file
544
themes/BlueInfinity/views/layouts/main.blade.php
Normal file
|
@ -0,0 +1,544 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
|
||||
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
|
||||
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
<link rel="icon"
|
||||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
|
||||
|
||||
{{-- summernote --}}
|
||||
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
||||
|
||||
{{-- datetimepicker --}}
|
||||
<link rel="stylesheet"
|
||||
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
|
||||
|
||||
{{-- select2 --}}
|
||||
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
|
||||
|
||||
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
|
||||
onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
|
||||
</noscript>
|
||||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
<!-- tinymce -->
|
||||
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
|
||||
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
|
||||
</head>
|
||||
|
||||
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
||||
<div class="wrapper">
|
||||
<!-- Navbar -->
|
||||
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
|
||||
<!-- Left navbar links -->
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
||||
class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ route('home') }}" class="nav-link"><i
|
||||
class="fas fa-home mr-2"></i>{{ __('Home') }}</a>
|
||||
</li>
|
||||
@if (config('SETTINGS::DISCORD:INVITE_URL'))
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ config('SETTINGS::DISCORD:INVITE_URL') }}" class="nav-link" target="__blank"><i
|
||||
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<!-- Language Selection -->
|
||||
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600">
|
||||
<small><i class="fa fa-language mr-2"></i></small>{{ __('Language') }}
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="changeLocale">
|
||||
<form method="post" action="{{ route('changeLocale') }}" class="nav-item text-center">
|
||||
@csrf
|
||||
@foreach (explode(',', config('SETTINGS::LOCALE:AVAILABLE')) as $key)
|
||||
<button class="dropdown-item" name="inputLocale" value="{{ $key }}">
|
||||
{{ __($key) }}
|
||||
</button>
|
||||
@endforeach
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
<!-- End Language Selection -->
|
||||
@endif
|
||||
@foreach($useful_links as $link)
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
|
||||
class="{{$link->icon}}"></i> {{ $link->title }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<!-- Right navbar links -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<!-- Notifications Dropdown Menu -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||
<i class="far fa-bell"></i>
|
||||
@if (Auth::user()->unreadNotifications->count() != 0)
|
||||
<span
|
||||
class="badge badge-warning navbar-badge">{{ Auth::user()->unreadNotifications->count() }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
<span class="dropdown-item dropdown-header">{{ Auth::user()->unreadNotifications->count() }}
|
||||
{{ __('Notifications') }}</span>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5) as $notification)
|
||||
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
|
||||
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
|
||||
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
|
||||
<span
|
||||
class="float-right text-muted text-sm">{{ $notification->created_at->longAbsoluteDiffForHumans() }}
|
||||
ago</span>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{{ route('notifications.index') }}"
|
||||
class="dropdown-item dropdown-footer">{{ __('See all Notifications') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{{ route('notifications.readAll') }}"
|
||||
class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="#" id="userDropdown" role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600">
|
||||
<small><i class="fas fa-coins mr-2"></i></small>{{ Auth::user()->credits() }}
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="{{ route('store.index') }}">
|
||||
<i class="fas fa-coins fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Store') }}
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" data-toggle="modal" data-target="#redeemVoucherModal"
|
||||
href="javascript:void(0)">
|
||||
<i class="fas fa-money-check-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Redeem code') }}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600 small">
|
||||
{{ Auth::user()->name }}
|
||||
<img width="28px" height="28px" class="rounded-circle ml-1"
|
||||
src="{{ Auth::user()->getAvatar() }}">
|
||||
</span>
|
||||
</a>
|
||||
<!-- Dropdown - User Information -->
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="{{ route('profile.index') }}">
|
||||
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Profile') }}
|
||||
</a>
|
||||
{{-- <a class="dropdown-item" href="#"> --}}
|
||||
{{-- <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i> --}}
|
||||
{{-- Activity Log --}}
|
||||
{{-- </a> --}}
|
||||
@if (session()->get('previousUser'))
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{ route('users.logbackin') }}">
|
||||
<i class="fas fa-sign-in-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Log back in') }}
|
||||
</a>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
<form method="post" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button class="dropdown-item" href="#" data-toggle="modal"
|
||||
data-target="#logoutModal">
|
||||
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Logout') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.navbar -->
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-open sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="{{ route('home') }}" class="brand-link">
|
||||
<img width="64" height="64"
|
||||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar" style="overflow-y: auto">
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="my-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||
data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('home') }}"
|
||||
class="nav-link @if (Request::routeIs('home')) active @endif">
|
||||
<i class="nav-icon fa fa-home"></i>
|
||||
<p>{{ __('Dashboard') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('servers.index') }}"
|
||||
class="nav-link @if (Request::routeIs('servers.*')) active @endif">
|
||||
<i class="nav-icon fa fa-server"></i>
|
||||
<p>{{ __('Servers') }}
|
||||
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
|
||||
{{ Auth::user()->server_limit }}</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@if (env('APP_ENV') == 'local' ||
|
||||
(config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) ||
|
||||
(config('SETTINGS::PAYMENTS:STRIPE:SECRET') &&
|
||||
config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') &&
|
||||
config('SETTINGS::PAYMENTS:STRIPE:METHODS')))
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('store.index') }}"
|
||||
class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
|
||||
<i class="nav-icon fa fa-coins"></i>
|
||||
<p>{{ __('Store') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (config('SETTINGS::TICKET:ENABLED'))
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('ticket.index') }}"
|
||||
class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
|
||||
<i class="nav-icon fas fas fa-ticket-alt"></i>
|
||||
<p>{{ __('Support Ticket') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ((Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') && config('SETTINGS::TICKET:ENABLED'))
|
||||
<li class="nav-header">{{ __('Moderation') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('moderator.ticket.index') }}"
|
||||
class="nav-link @if (Request::routeIs('moderator.ticket.index')) active @endif">
|
||||
<i class="nav-icon fas fa-ticket-alt"></i>
|
||||
<p>{{ __('Ticket List') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('moderator.ticket.blacklist') }}"
|
||||
class="nav-link @if (Request::routeIs('moderator.ticket.blacklist')) active @endif">
|
||||
<i class="nav-icon fas fa-user-times"></i>
|
||||
<p>{{ __('Ticket Blacklist') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->role == 'admin')
|
||||
<li class="nav-header">{{ __('Administration') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.overview.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.overview.*')) active @endif">
|
||||
<i class="nav-icon fa fa-home"></i>
|
||||
<p>{{ __('Overview') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.settings.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.settings.*')) active @endif">
|
||||
<i class="nav-icon fas fa-tools"></i>
|
||||
<p>{{ __('Settings') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.api.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
|
||||
<i class="nav-icon fa fa-gamepad"></i>
|
||||
<p>{{ __('Application API') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-header">{{ __('Management') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.users.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
|
||||
<i class="nav-icon fas fa-users"></i>
|
||||
<p>{{ __('Users') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.servers.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.servers.*')) active @endif">
|
||||
<i class="nav-icon fas fa-server"></i>
|
||||
<p>{{ __('Servers') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.products.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.products.*')) active @endif">
|
||||
<i class="nav-icon fas fa-sliders-h"></i>
|
||||
<p>{{ __('Products') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.store.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.store.*')) active @endif">
|
||||
<i class="nav-icon fas fa-shopping-basket"></i>
|
||||
<p>{{ __('Store') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.vouchers.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.vouchers.*')) active @endif">
|
||||
<i class="nav-icon fas fa-money-check-alt"></i>
|
||||
<p>{{ __('Vouchers') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.partners.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.partners.*')) active @endif">
|
||||
<i class="nav-icon fas fa-handshake"></i>
|
||||
<p>{{ __('Partners') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-header">Pterodactyl</li> --}}
|
||||
|
||||
{{-- <li class="nav-item"> --}}
|
||||
{{-- <a href="{{route('admin.nodes.index')}}" --}}
|
||||
{{-- class="nav-link @if (Request::routeIs('admin.nodes.*')) active @endif"> --}}
|
||||
{{-- <i class="nav-icon fas fa-sitemap"></i> --}}
|
||||
{{-- <p>Nodes</p> --}}
|
||||
{{-- </a> --}}
|
||||
{{-- </li> --}}
|
||||
|
||||
{{-- <li class="nav-item"> --}}
|
||||
{{-- <a href="{{route('admin.nests.index')}}" --}}
|
||||
{{-- class="nav-link @if (Request::routeIs('admin.nests.*')) active @endif"> --}}
|
||||
{{-- <i class="nav-icon fas fa-th-large"></i> --}}
|
||||
{{-- <p>Nests</p> --}}
|
||||
{{-- </a> --}}
|
||||
{{-- </li> --}}
|
||||
|
||||
|
||||
<li class="nav-header">{{ __('Other') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.usefullinks.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.usefullinks.*')) active @endif">
|
||||
<i class="nav-icon fas fa-link"></i>
|
||||
<p>{{ __('Useful Links') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.legal.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
|
||||
<i class="nav-icon fas fa-link"></i>
|
||||
<p>{{ __('Legal Sites') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-header">{{ __('Logs') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.payments.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.payments.*')) active @endif">
|
||||
<i class="nav-icon fas fa-money-bill-wave"></i>
|
||||
<p>{{ __('Payments') }}
|
||||
<span
|
||||
class="badge badge-success right">{{ \App\Models\Payment::count() }}</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.activitylogs.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.activitylogs.*')) active @endif">
|
||||
<i class="nav-icon fas fa-clipboard-list"></i>
|
||||
<p>{{ __('Activity Logs') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
@if (!Auth::user()->hasVerifiedEmail())
|
||||
@if (Auth::user()->created_at->diffInHours(now(), false) > 1)
|
||||
<div class="alert alert-warning p-2 m-2">
|
||||
<h5><i class="icon fas fa-exclamation-circle"></i> {{ __('Warning!') }}</h5>
|
||||
{{ __('You have not yet verified your email address') }} <a class="text-primary"
|
||||
href="{{ route('verification.send') }}">{{ __('Click here to resend verification email') }}</a>
|
||||
<br>
|
||||
{{ __('Please contact support If you didnt receive your verification email.') }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@yield('content')
|
||||
|
||||
@include('models.redeem_voucher_modal')
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
<strong>Copyright © 2021-{{ date('Y') }} <a
|
||||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>. | Theme by <a href="https://2icecube.de/cpgg">2IceCube</a>
|
||||
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
|
||||
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
|
||||
@endif
|
||||
|
||||
{{-- Show imprint and privacy link --}}
|
||||
<div class="float-right d-none d-sm-inline-block">
|
||||
@if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
|
||||
<a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
|
||||
@endif
|
||||
@if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
|
||||
<a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
|
||||
@endif
|
||||
@if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
|
||||
| <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
|
||||
@endif
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Control sidebar content goes here -->
|
||||
</aside>
|
||||
<!-- /.control-sidebar -->
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
|
||||
<!-- Summernote -->
|
||||
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||
<!-- select2 -->
|
||||
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
|
||||
|
||||
<!-- Moment.js -->
|
||||
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
|
||||
|
||||
<!-- Datetimepicker -->
|
||||
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src={{ asset('plugins/select2/js/select2.min.js') }}></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
@if (Session::has('error'))
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Oops...',
|
||||
html: '{{ Session::get('error') }}',
|
||||
})
|
||||
@endif
|
||||
@if (Session::has('success'))
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: '{{ Session::get('success') }}',
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
background: '#343a40',
|
||||
toast: true,
|
||||
timer: 3000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
})
|
||||
@endif
|
||||
@if (Session::has('info'))
|
||||
Swal.fire({
|
||||
icon: 'info',
|
||||
title: '{{ Session::get('info') }}',
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
background: '#343a40',
|
||||
toast: true,
|
||||
timer: 3000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
})
|
||||
@endif
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -33,7 +33,7 @@
|
|||
@else
|
||||
<div class="callout callout-danger">
|
||||
<h4>{{ __('No recent activity from cronjobs')}}</h4>
|
||||
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://controlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
|
||||
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://ctrlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
113
themes/default/views/admin/legal/index.blade.php
Normal file
113
themes/default/views/admin/legal/index.blade.php
Normal file
|
@ -0,0 +1,113 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<!-- CONTENT HEADER -->
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{__('Legal')}}</h1>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted"
|
||||
href="{{route('admin.legal.index')}}">{{__('Legal')}}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END CONTENT HEADER -->
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="{{ route('admin.legal.update') }}">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
{{-- TOS --}}
|
||||
<div class="row mb-2">
|
||||
<div class="col text-center">
|
||||
<h1>{{__("Terms of Service")}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<textarea x-model="tos" id="tos" name="tos"
|
||||
class="form-control @error('tos') is-invalid @enderror">
|
||||
{{ $tos }}
|
||||
</textarea>
|
||||
@error('motd-message')
|
||||
<div class="text-danger">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{-- PRIVACY --}}
|
||||
<div class="row mb-2">
|
||||
<div class="col text-center">
|
||||
<h1>{{__("Privacy Policy")}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<textarea x-model="privacy" id="privacy" name="privacy"
|
||||
class="form-control @error('privacy') is-invalid @enderror">
|
||||
{{ $privacy }}
|
||||
</textarea>
|
||||
@error('privacy')
|
||||
<div class="text-danger">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{-- Imprint --}}
|
||||
<div class="row mb-2">
|
||||
<div class="col text-center">
|
||||
<h1>{{__("Imprint")}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<textarea x-model="imprint" id="imprint" name="imprint"
|
||||
class="form-control @error('imprint') is-invalid @enderror">
|
||||
{{ $imprint }}
|
||||
</textarea>
|
||||
@error('imprint')
|
||||
<div class="text-danger">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="btn btn-primary ml-3 mt-3">{{ __('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CUSTOM CONTENT -->
|
||||
|
||||
</section>
|
||||
<!-- END CONTENT -->
|
||||
|
||||
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
|
||||
content_css: "dark",branding: false, height: 500,
|
||||
plugins: ['image','link'],});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
|
@ -23,7 +23,7 @@
|
|||
<b><i class="fas fa-shield-alt"></i> {{__("Version Outdated:")}}</b></br>
|
||||
{{__("You are running on")}} v{{config("app.version")}}-{{config("BRANCHNAME")}}.
|
||||
{{__("The latest Version is")}} v{{Storage::get('latestVersion')}}</br>
|
||||
<a href="https://controlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
|
||||
<a href="https://ctrlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
|
@ -39,16 +39,16 @@
|
|||
class="fab fa-discord mr-2"></i> {{__('Support server')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://controlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
|
||||
<a href="https://ctrlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-link mr-2"></i> {{__('Documentation')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://github.com/ControlPanel-gg/dashboard" class="btn btn-dark btn-block px-3"><i
|
||||
<a href="https://github.com/CtrlPanel-gg/panel" class="btn btn-dark btn-block px-3"><i
|
||||
class="fab fa-github mr-2"></i> {{__('Github')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://controlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-money-bill mr-2"></i> {{__('Support ControlPanel')}}</a>
|
||||
<a href="https://ctrlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-money-bill mr-2"></i> {{__('Support CtrlPanel')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -199,7 +199,7 @@
|
|||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="card-title ">
|
||||
<span><i class="fas fa-server mr-2"></i>{{__('Controlpanel.gg')}}</span>
|
||||
<span><i class="fas fa-server mr-2"></i>{{__('Ctrlpanel.gg')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-1">
|
||||
|
@ -227,7 +227,7 @@
|
|||
<p class="mb-2">
|
||||
{{ __('You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.') }}<br>
|
||||
{{ __('You can do that in settings.') }}<br><br>
|
||||
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.') }}
|
||||
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.') }}
|
||||
</p>
|
||||
<a href="{{route('admin.servers.sync')}}" class="btn btn-primary btn-md"><i
|
||||
class="fas fa-sync mr-2"></i>{{__('Sync servers')}}</a>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{__('Vouchers')}}</h1>
|
||||
<h1>{{__('Partner')}}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Vouchers')}}</a>
|
||||
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Partner')}}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item"><a class="text-muted"
|
||||
href="{{route('admin.partners.create')}}">{{__('Create')}}</a>
|
||||
|
@ -40,19 +40,14 @@
|
|||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<label for="user_id">{{__('User')}}</label>
|
||||
<select id="user_id" style="width:100%"
|
||||
class="custom-select @error('user') is-invalid @enderror" name="user_id" autocomplete="off">
|
||||
@foreach($users as $user)
|
||||
<option @if($partners->contains('user_id' , $user->id)) disabled @endif
|
||||
value="{{$user->id}}">{{$user->name}} ({{$user->email}})</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('user')
|
||||
<div class="text-danger">
|
||||
{{$message}}
|
||||
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<label for="user_id">{{ __('User') }}:
|
||||
</label>
|
||||
<select id="user_id" style="width:100%" class="custom-select" name="user_id" required
|
||||
autocomplete="off" @error('user_id') is-invalid @enderror>
|
||||
</select>
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -143,5 +138,75 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function initUserIdSelect(data) {
|
||||
function escapeHtml(str) {
|
||||
var div = document.createElement('div');
|
||||
div.appendChild(document.createTextNode(str));
|
||||
return div.innerHTML;
|
||||
}
|
||||
|
||||
@endsection
|
||||
$('#user_id').select2({
|
||||
ajax: {
|
||||
url: '/admin/users.json',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
filter: { name: params.term },
|
||||
page: params.page,
|
||||
};
|
||||
},
|
||||
|
||||
processResults: function (data, params) {
|
||||
return { results: data };
|
||||
},
|
||||
|
||||
cache: true,
|
||||
},
|
||||
|
||||
data: data,
|
||||
escapeMarkup: function (markup) { return markup; },
|
||||
minimumInputLength: 2,
|
||||
templateResult: function (data) {
|
||||
if (data.loading) return escapeHtml(data.text);
|
||||
|
||||
return '<div class="user-block"> \
|
||||
<img class="img-circle img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" alt="User Image"> \
|
||||
<span class="username"> \
|
||||
<a href="#">' + escapeHtml(data.name) +'</a> \
|
||||
</span> \
|
||||
<span class="description"><strong>' + escapeHtml(data.email) + '</strong>' + '</span> \
|
||||
</div>';
|
||||
},
|
||||
templateSelection: function (data) {
|
||||
return '<div> \
|
||||
<span> \
|
||||
<img class="img-rounded img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" style="height:28px;margin-top:-4px;" alt="User Image"> \
|
||||
</span> \
|
||||
<span style="padding-left:5px;"> \
|
||||
' + escapeHtml(data.name) + ' (<strong>' + escapeHtml(data.email) + '</strong>) \
|
||||
</span> \
|
||||
</div>';
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
@if (old('user_id'))
|
||||
$.ajax({
|
||||
url: '/admin/users.json?user_id={{ old('user_id') }}',
|
||||
dataType: 'json',
|
||||
}).then(function (data) {
|
||||
initUserIdSelect([ data ]);
|
||||
});
|
||||
@else
|
||||
initUserIdSelect();
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<div class="form-group">
|
||||
<label for="identifier">{{ __('Server identifier') }}
|
||||
<i data-toggle="popover" data-trigger="hover"
|
||||
data-content="{{ __('Change the server identifier on controlpanel to match a pterodactyl server.') }}"
|
||||
data-content="{{ __('Change the server identifier on ctrlpanel to match a pterodactyl server.') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
</label>
|
||||
<input value="{{ $server->identifier }}" id="identifier" name="identifier"
|
||||
|
@ -59,7 +59,7 @@
|
|||
<div class="form-group">
|
||||
<label for="user_id">{{ __('Server owner') }}
|
||||
<i data-toggle="popover" data-trigger="hover"
|
||||
data-content="{{ __('Change the current server owner on controlpanel and pterodactyl.') }}"
|
||||
data-content="{{ __('Change the current server owner on ctrlpanel and pterodactyl.') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
</label>
|
||||
<select name="user_id" id="user_id" class="form-control">
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<table id="datatable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20"></th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('User')}}</th>
|
||||
<th>{{__('Server id')}}</th>
|
||||
<th>{{__('Config')}}</th>
|
||||
<th>{{__('Suspended at')}}</th>
|
||||
<th>{{__('Created at')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="20"></th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('User') }}</th>
|
||||
<th>{{ __('Server id') }}</th>
|
||||
<th>{{ __('Config') }}</th>
|
||||
<th>{{ __('Suspended at') }}</th>
|
||||
<th>{{ __('Created at') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
|
@ -17,30 +17,53 @@
|
|||
|
||||
<script>
|
||||
function submitResult() {
|
||||
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
|
||||
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
$('#datatable').DataTable({
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
stateSave: true,
|
||||
ajax: "{{route('admin.servers.datatable')}}{{$filter ?? ''}}",
|
||||
order: [[ 5, "desc" ]],
|
||||
columns: [
|
||||
{data: 'status' , name : 'servers.suspended'},
|
||||
{data: 'name'},
|
||||
{data: 'user' , name : 'user.name'},
|
||||
{data: 'identifier'},
|
||||
{data: 'resources' , name : 'product.name'},
|
||||
{data: 'suspended'},
|
||||
{data: 'created_at'},
|
||||
{data: 'actions' , sortable : false},
|
||||
ajax: "{{ route('admin.servers.datatable') }}{{ $filter ?? '' }}",
|
||||
order: [
|
||||
[6, "desc"]
|
||||
],
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
columns: [{
|
||||
data: 'status',
|
||||
name: 'servers.suspended',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'name'
|
||||
},
|
||||
{
|
||||
data: 'user',
|
||||
name: 'user.name',
|
||||
},
|
||||
{
|
||||
data: 'identifier'
|
||||
},
|
||||
{
|
||||
data: 'resources',
|
||||
name: 'product.name',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'suspended'
|
||||
},
|
||||
{
|
||||
data: 'created_at'
|
||||
},
|
||||
{
|
||||
data: 'actions',
|
||||
sortable: false
|
||||
},
|
||||
],
|
||||
fnDrawCallback: function(oSettings) {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -20,11 +20,9 @@
|
|||
<input value="true" id="show-tos" name="show-tos"
|
||||
{{ config('SETTINGS::SYSTEM:SHOW_TOS') == 'true' ? 'checked' : '' }}
|
||||
type="checkbox">
|
||||
<label for="show-tos">{{ __('Show Terms of Service') }} </label>
|
||||
<label for="show-tos">{{ __('Show Terms of Service') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
|
||||
</div>
|
||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||
data-content="{{ __('Show the TOS link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/information/tos-content.blade.php</b>') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-control mb-1 p-0">
|
||||
|
@ -33,11 +31,9 @@
|
|||
<input value="true" id="show-imprint" name="show-imprint"
|
||||
{{ config('SETTINGS::SYSTEM:SHOW_IMPRINT') == 'true' ? 'checked' : '' }}
|
||||
type="checkbox">
|
||||
<label for="show-imprint">{{ __('Show Imprint') }} </label>
|
||||
<label for="show-imprint">{{ __('Show Imprint') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
|
||||
</div>
|
||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||
data-content="{{ __('Show the imprint link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/imprint-content.blade.php</b>') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-control mb-1 p-0">
|
||||
|
@ -46,11 +42,9 @@
|
|||
<input value="true" id="show-privacy" name="show-privacy"
|
||||
{{ config('SETTINGS::SYSTEM:SHOW_PRIVACY') == 'true' ? 'checked' : '' }}
|
||||
type="checkbox">
|
||||
<label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
|
||||
<label for="show-privacy">{{ __('Show Privacy Policy') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
|
||||
</div>
|
||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||
data-content="{{ __('Show the privacy policy link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/privacy-content.blade.php</b>') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-control mb-1 p-0">
|
||||
|
@ -184,7 +178,7 @@
|
|||
type="checkbox">
|
||||
<label for="enable-disable-new-users">{{ __('Creation of new users') }} </label>
|
||||
<i data-toggle="popover" data-trigger="hover" data-html="true" class="fas fa-info-circle"
|
||||
data-content="{{ __('If unchecked, it will disable the registration of new users in the system, and this will also apply to the API.') }}">
|
||||
data-content="{{ __('Enable the registration of new users on the system.') }}">
|
||||
</i>
|
||||
</div>
|
||||
|
||||
|
@ -271,7 +265,7 @@
|
|||
<label for="enable-disable-servers">{{ __('Creation of new servers') }} </label>
|
||||
</div>
|
||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||
data-content="{{ __('If unchecked, it will disable the creation of new servers for regular users and system moderators, this has no effect for administrators.') }}"
|
||||
data-content="{{ __('Enables the creation of new servers for regular users.') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -481,7 +475,7 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>tinymce.init({selector:'textarea',skin: "oxide-dark",
|
||||
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
|
||||
content_css: "dark",branding: false, height: 500,
|
||||
plugins: ['image','link'],});
|
||||
</script>
|
||||
|
|
|
@ -102,10 +102,12 @@
|
|||
data: 'price'
|
||||
},
|
||||
{
|
||||
data: 'display'
|
||||
data: 'display',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'description'
|
||||
data: 'description',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'created_at'
|
||||
|
@ -121,7 +123,4 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -94,6 +94,23 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="position">{{__('Position')}}</label>
|
||||
<select id="position" style="width:100%" class="custom-select" name="position[]"
|
||||
required multiple autocomplete="off" @error('position') is-invalid @enderror>
|
||||
@foreach ($positions as $position)
|
||||
<option id="{{$position->value}}" value="{{ $position->value }}">
|
||||
{{ __($position->value) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('position')
|
||||
<div class="text-danger">
|
||||
{{$message}}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
|
@ -111,6 +128,7 @@
|
|||
<!-- END CONTENT -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
$('.custom-select').select2();
|
||||
// Summernote
|
||||
$('#description').summernote({
|
||||
height: 100,
|
||||
|
@ -127,6 +145,8 @@
|
|||
]
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -95,6 +95,23 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="position">{{__('Position')}}</label>
|
||||
<select id="position" style="width:100%" class="custom-select" name="position[]"
|
||||
required multiple autocomplete="off" @error('position') is-invalid @enderror>
|
||||
@foreach ($positions as $position)
|
||||
<option id="{{$position->value}}" value="{{ $position->value }}" @if (strpos($link->position, $position->value) !== false) selected @endif>
|
||||
{{ __($position->value) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('position')
|
||||
<div class="text-danger">
|
||||
{{$message}}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
|
@ -113,6 +130,7 @@
|
|||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
$('.custom-select').select2();
|
||||
// Summernote
|
||||
$('#description').summernote({
|
||||
height: 100,
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<th width="50">{{__('Icon')}}</th>
|
||||
<th>{{__('Title')}}</th>
|
||||
<th>{{__('Link')}}</th>
|
||||
<th>{{__('Position')}}</th>
|
||||
<th>{{__('Created at')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -79,6 +80,7 @@
|
|||
{data: 'icon'},
|
||||
{data: 'title'},
|
||||
{data: 'link'},
|
||||
{data: 'position'},
|
||||
{data: 'created_at'},
|
||||
{data: 'actions', sortable: false},
|
||||
],
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{__('Users')}}</h1>
|
||||
<h1>{{ __('Users') }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.users.index')}}">{{__('Users')}}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted"
|
||||
href="{{ route('admin.users.index') }}">{{ __('Users') }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,9 +28,9 @@
|
|||
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{__('Users')}}</h5>
|
||||
<a href="{{route('admin.users.notifications')}}" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-paper-plane mr-1"></i>{{__('Notify')}}</a>
|
||||
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{ __('Users') }}</h5>
|
||||
<a href="{{ route('admin.users.notifications') }}" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-paper-plane mr-1"></i>{{ __('Notify') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -37,21 +38,21 @@
|
|||
|
||||
<table id="datatable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>discordId</th>
|
||||
<th>ip</th>
|
||||
<th>pterodactyl_id</th>
|
||||
<th>{{__('Avatar')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Role')}}</th>
|
||||
<th>{{__('Email')}}</th>
|
||||
<th>{{CREDITS_DISPLAY_NAME}}</th>
|
||||
<th>{{__('Servers')}}</th>
|
||||
<th>{{__("Referrals")}}</th>
|
||||
<th>{{__('Verified')}}</th>
|
||||
<th>{{__('Last seen')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>discordId</th>
|
||||
<th>ip</th>
|
||||
<th>pterodactyl_id</th>
|
||||
<th>{{ __('Avatar') }}</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Role') }}</th>
|
||||
<th>{{ __('Email') }}</th>
|
||||
<th>{{ CREDITS_DISPLAY_NAME }}</th>
|
||||
<th>{{ __('Servers') }}</th>
|
||||
<th>{{ __('Referrals') }}</th>
|
||||
<th>{{ __('Verified') }}</th>
|
||||
<th>{{ __('Last seen') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
|
@ -68,41 +69,76 @@
|
|||
|
||||
<script>
|
||||
function submitResult() {
|
||||
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
|
||||
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
$('#datatable').DataTable({
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true, //why was this set to false before? increased loadingtimes by 10 seconds
|
||||
stateSave: true,
|
||||
ajax: "{{route('admin.users.datatable')}}",
|
||||
order: [[ 11, "asc" ]],
|
||||
columns: [
|
||||
{data: 'discordId', visible: false, name: 'discordUser.id'},
|
||||
{data: 'pterodactyl_id', visible: false},
|
||||
{data: 'ip', visible: false},
|
||||
{data: 'avatar' , sortable : false},
|
||||
{data: 'name'},
|
||||
{data: 'role'},
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'credits' , name : 'users.credits'},
|
||||
{data: 'servers'},
|
||||
{data: 'referrals'},
|
||||
{data: 'verified' , sortable : false},
|
||||
{data: 'last_seen', type: 'num', render: {_: 'display', sort: 'raw'}},
|
||||
{data: 'actions' , sortable : false},
|
||||
ajax: "{{ route('admin.users.datatable') }}{{ $filter ?? '' }}",
|
||||
order: [
|
||||
[11, "desc"]
|
||||
],
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
columns: [{
|
||||
data: 'discordId',
|
||||
visible: false,
|
||||
name: 'discordUser.id'
|
||||
},
|
||||
{
|
||||
data: 'pterodactyl_id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
data: 'ip',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
data: 'avatar',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'name'
|
||||
},
|
||||
{
|
||||
data: 'role'
|
||||
},
|
||||
{
|
||||
data: 'email',
|
||||
name: 'users.email'
|
||||
},
|
||||
{
|
||||
data: 'credits',
|
||||
name: 'users.credits'
|
||||
},
|
||||
{
|
||||
data: 'servers_count',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'referrals_count',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'verified',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'last_seen',
|
||||
},
|
||||
{
|
||||
data: 'actions',
|
||||
sortable: false
|
||||
},
|
||||
],
|
||||
fnDrawCallback: function(oSettings) {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
class="mr-1">{{ config('app.name', 'Laravel') }}</b></a>
|
||||
@if (config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Controlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
|
||||
alt="{{ config('app.name', 'Ctrlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
|
||||
@endif
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
@foreach ($useful_links as $useful_link)
|
||||
@foreach ($useful_links_dashboard as $useful_link)
|
||||
<div class="alert alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert"
|
||||
aria-hidden="true">×</button>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<p><strong>Company</strong> (referred to as either "the Company", "We", "Us" or
|
||||
"Our" in this Agreement) refers to controlpanel.</p>
|
||||
"Our" in this Agreement) refers to ctrlpanel.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Cookies</strong> are small files that are placed on Your computer, mobile device or any other device
|
||||
|
@ -49,8 +49,8 @@
|
|||
Service or from the Service infrastructure itself (for example, the duration of a page visit).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Website</strong> refers to controlpanel, accessible from <a href="controlpanel"
|
||||
rel="external nofollow noopener" target="_blank">controlpanel</a></p>
|
||||
<p><strong>Website</strong> refers to ctrlpanel, accessible from <a href="ctrlpanel"
|
||||
rel="external nofollow noopener" target="_blank">ctrlpanel</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>You</strong> means the individual accessing or using the Service, or the company, or other legal
|
||||
|
|
|
@ -16,24 +16,21 @@
|
|||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
|
||||
onload="this.onload=null;this.rel='stylesheet'">
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
|
||||
</noscript>
|
||||
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
|
||||
{!! htmlScriptTagJsApi() !!}
|
||||
@endif
|
||||
@vite('themes/default/sass/app.scss')
|
||||
</head>
|
||||
@yield('content')
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
|
||||
|
@ -22,8 +22,6 @@
|
|||
{{-- summernote --}}
|
||||
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
||||
|
||||
|
||||
|
||||
{{-- datetimepicker --}}
|
||||
<link rel="stylesheet"
|
||||
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
|
||||
|
@ -31,7 +29,6 @@
|
|||
{{-- select2 --}}
|
||||
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
|
||||
onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript>
|
||||
|
@ -40,6 +37,7 @@
|
|||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
<!-- tinymce -->
|
||||
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
|
||||
@vite('themes/default/sass/app.scss')
|
||||
</head>
|
||||
|
||||
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
||||
|
@ -62,6 +60,7 @@
|
|||
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<!-- Language Selection -->
|
||||
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
|
||||
<li class="nav-item dropdown">
|
||||
|
@ -86,6 +85,12 @@
|
|||
</li>
|
||||
<!-- End Language Selection -->
|
||||
@endif
|
||||
@foreach($useful_links as $link)
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
|
||||
class="{{$link->icon}}"></i> {{ $link->title }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<!-- Right navbar links -->
|
||||
|
@ -194,7 +199,7 @@
|
|||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
@ -374,6 +379,14 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.legal.index') }}"
|
||||
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
|
||||
<i class="nav-icon fas fa-link"></i>
|
||||
<p>{{ __('Legal Sites') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-header">{{ __('Logs') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
|
@ -428,8 +441,8 @@
|
|||
<strong>Copyright © 2021-{{ date('Y') }} <a
|
||||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
|
||||
@if (!str_contains(config('BRANCHNAME'), 'main'))
|
||||
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>.
|
||||
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
|
||||
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
|
||||
@endif
|
||||
|
||||
|
|
132
themes/default/views/moderator/ticket/category.blade.php
Normal file
132
themes/default/views/moderator/ticket/category.blade.php
Normal file
|
@ -0,0 +1,132 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<!-- CONTENT HEADER -->
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ __('Ticket Categories') }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted"
|
||||
href="{{ route("moderator.ticket.category.index") }}">{{ __('Ticket Categories') }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END CONTENT HEADER -->
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><i class="fas fas fa-users mr-2"></i>{{__('Categories')}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body table-responsive">
|
||||
|
||||
<table id="datatable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('ID')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Tickets')}}</th>
|
||||
<th>{{__('Created At')}}</th>
|
||||
<th>{{__('Actions')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{{__('Add Category')}}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{route("moderator.ticket.category.store")}}" method="POST" class="ticket-form">
|
||||
@csrf
|
||||
<div class="form-group ">
|
||||
<label for="name" class="control-label">{{__("Name")}}</label>
|
||||
<input id="name" type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{__('Submit')}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{{__('Edit Category')}}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{route("moderator.ticket.category.update","1")}}" method="POST" class="ticket-form">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<select id="category" style="width:100%" class="custom-select" name="category"
|
||||
required autocomplete="off" @error('category') is-invalid @enderror>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ __($category->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="form-group ">
|
||||
<label for="name" class="control-label">{{__("New Name")}}</label>
|
||||
<input id="name" type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{__('Submit')}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- END CONTENT -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
$('#datatable').DataTable({
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
stateSave: true,
|
||||
ajax: "{{route('moderator.ticket.category.datatable')}}",
|
||||
columns: [
|
||||
{data: 'id'},
|
||||
{data: 'name'},
|
||||
{data: 'tickets'},
|
||||
{data: 'created_at', sortable: false},
|
||||
{data: 'actions', sortable: false},
|
||||
],
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
$('.custom-select').select2();
|
||||
})
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -30,8 +30,11 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><i class="fas fa-ticket-alt mr-2"></i>{{__('Ticket List')}}</h5>
|
||||
</div>
|
||||
<a href="{{route("moderator.ticket.category.index")}}"><button class="btn btn-primary float-right">+ {{__("Add Category")}}</button></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-body table-responsive">
|
||||
|
||||
<table id="datatable" class="table table-striped">
|
||||
|
|
|
@ -35,29 +35,64 @@
|
|||
<div class="card-body">
|
||||
<div class="ticket-info">
|
||||
@if(!empty($server))
|
||||
<p><b>Server:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
|
||||
<p><b>{{__("Server")}}:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
|
||||
@endif
|
||||
<p><b>Title:</b> {{ $ticket->title }}</p>
|
||||
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
|
||||
<p>
|
||||
@if ($ticket->status === 'Open')
|
||||
<b>Status:</b> <span class="badge badge-success">Open</span>
|
||||
@elseif ($ticket->status === 'Closed')
|
||||
<b>Status:</b> <span class="badge badge-danger">Closed</span>
|
||||
@elseif ($ticket->status === 'Answered')
|
||||
<b>Status:</b> <span class="badge badge-info">Answered</span>
|
||||
@elseif ($ticket->status === 'Client Reply')
|
||||
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
|
||||
@endif
|
||||
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
|
||||
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
|
||||
<p><b>{{__("Status")}}:</b>
|
||||
@switch($ticket->status)
|
||||
@case("Open")
|
||||
<span class="badge badge-success">{{__("Open")}}</span>
|
||||
@break
|
||||
@case("Reopened")
|
||||
<span class="badge badge-success">{{__("Reopened")}}</span>
|
||||
@break
|
||||
@case("Closed")
|
||||
<span class="badge badge-danger">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("Answered")
|
||||
<span class="badge badge-info">{{__("Answered")}}</span>
|
||||
@break
|
||||
@case("Client Reply")
|
||||
<span class="badge badge-warning">{{__("Client Reply")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status!='Closed')
|
||||
<form class="d-inline" method="post" action="{{route('moderator.ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i>{{__("Close")}}</button>
|
||||
</form>
|
||||
@endif
|
||||
<p><b>Priority:</b>
|
||||
@switch($ticket->priority)
|
||||
@case("Low")
|
||||
<span class="badge badge-success">{{__("Low")}}</span>
|
||||
@break
|
||||
@case("Medium")
|
||||
<span class="badge badge-warning">{{__("Medium")}}</span>
|
||||
@break
|
||||
@case("High")
|
||||
<span class="badge badge-danger">{{__("High")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status=='Closed')
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Reopen")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-success mr-1"><i
|
||||
class="fas fa-redo"></i>{{__("Reopen")}}</button>
|
||||
</form>
|
||||
@else
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-warning mr-1"><i
|
||||
class="fas fa-times"></i>{{__("Close")}}</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
{{ __('Required') }} {{ CREDITS_DISPLAY_NAME }}
|
||||
{{ __('to create this server') }}</span>
|
||||
<span class="d-inline-block"
|
||||
x-text="product.minimum_credits === -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credit"></span>
|
||||
x-text="product.minimum_credits == -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credits"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -77,21 +77,25 @@
|
|||
<div class="row">
|
||||
<!-- accepted payments column -->
|
||||
<div class="col-6">
|
||||
<p class="lead">{{ __('Payment Methods') }}:</p>
|
||||
@if (!$productIsFree)
|
||||
<p class="lead">{{ __('Payment Methods') }}:</p>
|
||||
|
||||
<div class="d-flex flex-wrap flex-direction-row">
|
||||
@foreach ($paymentGateways as $gateway)
|
||||
<div class="ml-2">
|
||||
<label class="text-center" for="{{ $gateway->name }}">
|
||||
<img class="mb-3" height="50" src="{{ $gateway->image }}"></br>
|
||||
<input x-on:click="console.log(payment_method)" x-model="payment_method"
|
||||
type="radio" id="{{ $gateway->name }}"
|
||||
value="{{ $gateway->name }}">
|
||||
</input>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="d-flex flex-wrap flex-direction-row">
|
||||
|
||||
@foreach ($paymentGateways as $gateway)
|
||||
<div class="ml-2">
|
||||
<label class="text-center" for="{{ $gateway->name }}">
|
||||
<img class="mb-3" height="50"
|
||||
src="{{ $gateway->image }}"></br>
|
||||
<input x-on:click="console.log(payment_method)"
|
||||
x-model="payment_method" type="radio"
|
||||
id="{{ $gateway->name }}" value="{{ $gateway->name }}">
|
||||
</input>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
|
@ -129,11 +133,15 @@
|
|||
<!-- this row will not appear when printing -->
|
||||
<div class="row no-print">
|
||||
<div class="col-12">
|
||||
<button :disabled="!payment_method || clicked"
|
||||
:class="!payment_method || clicked ? 'disabled' : ''"
|
||||
<button :disabled="(!payment_method || clicked) && {{ !$productIsFree }}"
|
||||
:class="(!payment_method || clicked) && {{ !$productIsFree }} ? 'disabled' : ''"
|
||||
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"
|
||||
@click="clicked = true"></i>
|
||||
{{ __('Submit Payment') }}
|
||||
@if ($productIsFree)
|
||||
{{ __('Get for free') }}
|
||||
@else
|
||||
{{ __('Submit Payment') }}
|
||||
@endif
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,14 +46,14 @@
|
|||
</div>
|
||||
@if ($servers->count() >= 1)
|
||||
<div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
|
||||
<label for="server" class="control-label">Servers</label>
|
||||
<label for="server" class="control-label">{{__("Server")}}</label>
|
||||
<select id="server" type="server" class="form-control" name="server">
|
||||
<option value="">Select Servers</option>
|
||||
<option value="">{{__("Select Servers")}}</option>
|
||||
@foreach ($servers as $server)
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
|
||||
@if ($errors->has('category'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
||||
|
@ -62,14 +62,14 @@
|
|||
</div>
|
||||
@endif
|
||||
<div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
|
||||
<label for="ticketcategory" class="control-label">Category</label>
|
||||
<select id="ticketcategory" type="ticketcategory" class="form-control" name="ticketcategory">
|
||||
<option value="">Select Category</option>
|
||||
<label for="ticketcategory" class="control-label">{{__("Category")}}</label>
|
||||
<select id="ticketcategory" type="ticketcategory" class="form-control" required name="ticketcategory">
|
||||
<option value="" disabled selected>{{__("Select Category")}}</option>
|
||||
@foreach ($ticketcategories as $ticketcategory)
|
||||
<option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
|
||||
@if ($errors->has('category'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
||||
|
@ -79,10 +79,10 @@
|
|||
<div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
|
||||
<label for="priority" class="control-label">Priority</label>
|
||||
<select id="priority" type="" class="form-control" name="priority">
|
||||
<option value="">Select Priority</option>
|
||||
<option value="Low">Low</option>
|
||||
<option value="Medium">Medium</option>
|
||||
<option value="High">High</option>
|
||||
<option value="" disabled selected>{{__("Select Priority")}}</option>
|
||||
<option value="Low">{{__("Low")}}</option>
|
||||
<option value="Medium">{{__("Medium")}}</option>
|
||||
<option value="High">{{__("High")}}</option>
|
||||
</select>
|
||||
@if ($errors->has('priority'))
|
||||
<span class="help-block">
|
||||
|
@ -108,7 +108,7 @@
|
|||
<div class="card-body">
|
||||
<div class="form-group col-sm-12 {{ $errors->has('message') ? ' has-error' : '' }}">
|
||||
<label for="message" class="control-label">Message</label>
|
||||
<textarea rows="8" id="message" class="form-control" name="message"></textarea>
|
||||
<textarea rows="8" id="message" class="form-control" name="message">{{old("message")}}</textarea>
|
||||
@if ($errors->has('message'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('message') }}</strong>
|
||||
|
@ -124,12 +124,12 @@
|
|||
</section>
|
||||
<!-- END CONTENT -->
|
||||
<script type="text/javascript">
|
||||
$(".ticket-form").submit(function (e) {
|
||||
|
||||
$(".ticket-once").attr("disabled", true);
|
||||
$(".ticket-form").submit(function (e) {
|
||||
|
||||
$(".ticket-once").attr("disabled", true);
|
||||
return true;
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
|
|
@ -86,12 +86,13 @@
|
|||
serverSide: true,
|
||||
stateSave: true,
|
||||
ajax: "{{route('ticket.datatable')}}",
|
||||
order: [[ 4, "desc" ]],
|
||||
columns: [
|
||||
{data: 'category'},
|
||||
{data: 'title'},
|
||||
{data: 'priority'},
|
||||
{data: 'status'},
|
||||
{data: 'updated_at', sortable: false},
|
||||
{data: 'updated_at', type: 'num', render: {_: 'display', sort: 'raw'}},
|
||||
{data: 'actions', sortable: false},
|
||||
],
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
|
|
|
@ -35,25 +35,58 @@
|
|||
<div class="card-body">
|
||||
<div class="ticket-info">
|
||||
@if(!empty($server))
|
||||
<p><b>Server:</b> <a href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}" target="__blank">{{ $server->name }} </a></p>
|
||||
<p><b>{{__("Server")}}:</b> <a
|
||||
href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}"
|
||||
target="__blank">{{ $server->name }} </a></p>
|
||||
@endif
|
||||
<p><b>Title:</b> {{ $ticket->title }}</p>
|
||||
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
|
||||
<p>
|
||||
@if ($ticket->status === 'Open')
|
||||
<b>Status:</b> <span class="badge badge-success">Open</span>
|
||||
@elseif ($ticket->status === 'Closed')
|
||||
<b>Status:</b> <span class="badge badge-danger">Closed</span>
|
||||
@elseif ($ticket->status === 'Answered')
|
||||
<b>Status:</b> <span class="badge badge-info">Answered</span>
|
||||
@elseif ($ticket->status === 'Client Reply')
|
||||
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
|
||||
@endif
|
||||
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
|
||||
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
|
||||
<p><b>{{__("Status")}}:</b>
|
||||
@switch($ticket->status)
|
||||
@case("Open")
|
||||
<span class="badge badge-success">{{__("Open")}}</span>
|
||||
@break
|
||||
@case("Reopened")
|
||||
<span class="badge badge-success">{{__("Reopened")}}</span>
|
||||
@break
|
||||
@case("Closed")
|
||||
<span class="badge badge-danger">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("Answered")
|
||||
<span class="badge badge-info">{{__("Answered")}}</span>
|
||||
@break
|
||||
@case("Client Reply")
|
||||
<span class="badge badge-warning">{{__("Client Reply")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status!='Closed')
|
||||
<p><b>Priority:</b>
|
||||
@switch($ticket->priority)
|
||||
@case("Low")
|
||||
<span class="badge badge-success">{{__("Low")}}</span>
|
||||
@break
|
||||
@case("Medium")
|
||||
<span class="badge badge-warning">{{__("Medium")}}</span>
|
||||
@break
|
||||
@case("High")
|
||||
<span class="badge badge-danger">{{__("High")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status=='Closed')
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Reopen")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-success mr-1"><i
|
||||
class="fas fa-redo"></i>{{__("Reopen")}}</button>
|
||||
</form>
|
||||
@else
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover"
|
||||
|
@ -78,56 +111,60 @@
|
|||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
|
||||
@if($ticket->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticket->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticket->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticket->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
|
||||
@if($ticket->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticket->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticket->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticket->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
|
||||
<span
|
||||
class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="white-space:pre-wrap">{{ $ticket->message }}</div>
|
||||
</div>
|
||||
@foreach ($ticketcomments as $ticketcomment)
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
|
||||
@if($ticketcomment->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticketcomment->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticketcomment->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticketcomment->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
|
||||
@if($ticketcomment->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticketcomment->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticketcomment->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticketcomment->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span
|
||||
class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body"
|
||||
style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
|
||||
</div>
|
||||
<div class="card-body" style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="comment-form">
|
||||
<form action="{{ route('ticket.reply')}}" method="POST" class="form reply-form">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="ticket_id" value="{{ $ticket->id }}">
|
||||
<div class="form-group{{ $errors->has('ticketcomment') ? ' has-error' : '' }}">
|
||||
<textarea rows="10" id="ticketcomment" class="form-control" name="ticketcomment"></textarea>
|
||||
<textarea rows="10" id="ticketcomment" class="form-control"
|
||||
name="ticketcomment"></textarea>
|
||||
@if ($errors->has('ticketcomment'))
|
||||
<span class="help-block">
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('ticketcomment') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
@ -145,12 +182,12 @@
|
|||
</section>
|
||||
<!-- END CONTENT -->
|
||||
<script type="text/javascript">
|
||||
$(".reply-form").submit(function (e) {
|
||||
|
||||
$(".reply-once").attr("disabled", true);
|
||||
$(".reply-form").submit(function (e) {
|
||||
|
||||
$(".reply-once").attr("disabled", true);
|
||||
return true;
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
|
2
themes/default/vite.config.js
vendored
2
themes/default/vite.config.js
vendored
|
@ -11,7 +11,7 @@ export default defineConfig({
|
|||
"themes/default/sass/app.scss",
|
||||
"themes/default/js/app.js"
|
||||
],
|
||||
buildDirectory: "default",
|
||||
buildDirectory: "build",
|
||||
}),
|
||||
|
||||
|
||||
|
|
16
webpack.mix.js
vendored
16
webpack.mix.js
vendored
|
@ -1,16 +0,0 @@
|
|||
const mix = require('laravel-mix');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mix Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Mix provides a clean, fluent API for defining some Webpack build steps
|
||||
| for your Laravel application. By default, we are compiling the Sass
|
||||
| file for the application as well as bundling up all the JS files.
|
||||
|
|
||||
*/
|
||||
|
||||
mix.js('resources/js/app.js', 'public/js')
|
||||
.sass('resources/sass/app.scss', 'public/css')
|
||||
.sourceMaps();
|
Loading…
Add table
Reference in a new issue