Compare commits

..

995 Commits

Author SHA1 Message Date
84f08b548e Update .gitea/workflows/laravel.yml
All checks were successful
Laravel / laravel-tests (push) Successful in 4m40s
renovate / renovate (push) Successful in 1m1s
2026-02-03 10:40:15 +00:00
462bce226d Merge pull request 'Update ghcr.io/renovatebot/renovate Docker tag to v43.2.3' (#577) from renovate/ghcr.io-renovatebot-renovate-43.x into main
Some checks failed
Laravel / laravel-tests (push) Has been cancelled
renovate / renovate (push) Has been cancelled
2026-02-03 10:39:57 +00:00
Renovate Bot
2c3ae4ee86 Update ghcr.io/renovatebot/renovate Docker tag to v43.2.3
Some checks failed
Laravel / laravel-tests (pull_request) Failing after 4m41s
2026-02-03 10:39:55 +00:00
f4d6277646 Update .gitea/workflows/laravel.yml
Some checks failed
Laravel / laravel-tests (push) Failing after 4m57s
renovate / renovate (push) Has been cancelled
2026-02-03 10:34:11 +00:00
5e47287593 Update .gitea/workflows/laravel.yml
Some checks failed
Laravel / laravel-tests (push) Failing after 4m44s
renovate / renovate (push) Successful in 42s
2026-02-03 09:31:13 +00:00
dd5eb6782d disable posts
Some checks failed
Laravel / laravel-tests (push) Failing after 5m5s
renovate / renovate (push) Successful in 45s
2026-02-03 19:20:29 +10:00
0312e1dbea Merge pull request 'Update ghcr.io/renovatebot/renovate Docker tag to v43' (#574) from renovate/ghcr.io-renovatebot-renovate-43.x into main
Some checks failed
Laravel / laravel-tests (push) Failing after 6m29s
renovate / renovate (push) Successful in 1m10s
Reviewed-on: #574
2026-02-03 08:54:32 +00:00
b29ea655ba Merge branch 'main' into renovate/ghcr.io-renovatebot-renovate-43.x 2026-02-03 08:54:21 +00:00
Renovate Bot
8d06374bef Update ghcr.io/renovatebot/renovate Docker tag to v43 2026-02-03 08:53:24 +00:00
5ca0afc385 updated rules
Some checks failed
Laravel / laravel-tests (push) Has been cancelled
renovate / renovate (push) Has been cancelled
2026-02-03 18:53:22 +10:00
cc5a0de05d php 8.4 2026-02-03 18:52:22 +10:00
fe84e20645 disconnect github 2026-02-03 18:52:02 +10:00
2ba8881f3b Add .gitea/workflows/laravel.yml
Some checks failed
Laravel / laravel-tests (push) Failing after 2m54s
renovate / renovate (push) Successful in 46s
2026-02-03 08:49:50 +00:00
ce5c97290f Update .gitea/workflows/renovate.yaml
Some checks are pending
renovate / renovate (push) Waiting to run
2026-02-03 08:41:28 +00:00
Renovate Bot
0c7407c11b Update ghcr.io/renovatebot/renovate Docker tag to v37.440.7
Some checks failed
renovate / renovate (push) Has been cancelled
2026-02-03 08:40:50 +00:00
fe5ab7b0bf Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 20s
2026-02-03 08:36:12 +00:00
954b83ebba Update renovate-config.json
Some checks failed
renovate / renovate (push) Has been cancelled
2026-02-03 08:36:00 +00:00
9bfe23df9c Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 16s
2026-02-03 08:34:58 +00:00
5f78a9e500 Update renovate-config.cjs
Some checks failed
renovate / renovate (push) Failing after 16s
2026-02-03 08:34:30 +00:00
d47672dbe3 Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 13s
2026-02-03 08:31:17 +00:00
c3b898d99e Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 14s
2026-02-03 08:29:27 +00:00
b13b22c359 Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 21s
2026-02-03 08:27:28 +00:00
fa505f56ee Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 19s
2026-02-03 08:25:51 +00:00
464c7d5aa1 Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 24s
2026-02-03 08:23:55 +00:00
260b794111 Add renovate-config.js
Some checks failed
renovate / renovate (push) Failing after 2m40s
2026-02-03 08:18:55 +00:00
e2567c1b97 Update .gitea/workflows/renovate.yaml
Some checks are pending
renovate / renovate (push) Has started running
2026-02-03 08:18:29 +00:00
7302a36067 Update .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 22s
2026-02-03 08:10:39 +00:00
ac7b02f320 dependency updates
Some checks failed
renovate / renovate (push) Failing after 22s
2026-02-03 18:07:39 +10:00
0fbeb192c1 Add .gitea/workflows/renovate.yaml
Some checks failed
renovate / renovate (push) Failing after 55s
2026-02-03 07:42:37 +00:00
5c3788eb6d Add renovate.json
Some checks failed
Laravel / laravel-tests (push) Failing after 3m39s
2026-02-03 07:39:32 +00:00
James Collins
f01051107e Merge pull request #572 from STEMMechanics/dependabot/composer/livewire/livewire-4.1.2
Bump livewire/livewire from 4.1.0 to 4.1.2
2026-02-03 15:19:46 +10:00
dependabot[bot]
cf029bc86e Bump livewire/livewire from 4.1.0 to 4.1.2
Bumps [livewire/livewire](https://github.com/livewire/livewire) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/livewire/livewire/releases)
- [Commits](https://github.com/livewire/livewire/compare/v4.1.0...v4.1.2)

---
updated-dependencies:
- dependency-name: livewire/livewire
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 05:08:46 +00:00
James Collins
17ab10c1c5 Merge pull request #571 from STEMMechanics/dependabot/npm_and_yarn/autoprefixer-10.4.24
Bump autoprefixer from 10.4.23 to 10.4.24
2026-02-02 10:47:23 +10:00
dependabot[bot]
dc5c387f7a Bump autoprefixer from 10.4.23 to 10.4.24
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.23 to 10.4.24.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.23...10.4.24)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-version: 10.4.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 00:44:17 +00:00
James Collins
3b4d2b2784 Merge pull request #570 from STEMMechanics/dependabot/composer/psy/psysh-0.12.19
Bump psy/psysh from 0.12.18 to 0.12.19
2026-01-31 08:35:50 +10:00
dependabot[bot]
3b3dc276fc Bump psy/psysh from 0.12.18 to 0.12.19
Bumps [psy/psysh](https://github.com/bobthecow/psysh) from 0.12.18 to 0.12.19.
- [Release notes](https://github.com/bobthecow/psysh/releases)
- [Commits](https://github.com/bobthecow/psysh/compare/v0.12.18...v0.12.19)

---
updated-dependencies:
- dependency-name: psy/psysh
  dependency-version: 0.12.19
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 22:31:55 +00:00
James Collins
ee460ec076 Merge pull request #569 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-text-align-3.18.0
Bump @tiptap/extension-text-align from 3.17.1 to 3.18.0
2026-01-30 11:20:28 +10:00
James Collins
24e7c6a008 Merge pull request #568 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-image-3.18.0
Bump @tiptap/extension-image from 3.17.1 to 3.18.0
2026-01-30 11:20:16 +10:00
dependabot[bot]
1a6a1dab47 Bump @tiptap/extension-image from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-image](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-image) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-image/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-image)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-image"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:52:33 +00:00
dependabot[bot]
c85031ab49 Bump @tiptap/extension-text-align from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-text-align](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-text-align) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-text-align/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-text-align)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-text-align"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:52:32 +00:00
James Collins
24efcab8da Merge pull request #567 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-typography-3.18.0
Bump @tiptap/extension-typography from 3.17.1 to 3.18.0
2026-01-30 10:51:48 +10:00
James Collins
182e4e8de8 Merge pull request #565 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-subscript-3.18.0
Bump @tiptap/extension-subscript from 3.17.1 to 3.18.0
2026-01-30 10:51:36 +10:00
James Collins
6b62e45acf Merge pull request #566 from STEMMechanics/dependabot/npm_and_yarn/tiptap/starter-kit-3.18.0
Bump @tiptap/starter-kit from 3.17.1 to 3.18.0
2026-01-30 10:51:23 +10:00
dependabot[bot]
a37f744caa Bump @tiptap/extension-typography from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-typography](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-typography) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-typography/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-typography)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-typography"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:43:34 +00:00
dependabot[bot]
8eca69335f Bump @tiptap/starter-kit from 3.17.1 to 3.18.0
Bumps [@tiptap/starter-kit](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/starter-kit) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/starter-kit/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/starter-kit)

---
updated-dependencies:
- dependency-name: "@tiptap/starter-kit"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:43:22 +00:00
dependabot[bot]
87e70704c1 Bump @tiptap/extension-subscript from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-subscript](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-subscript) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-subscript/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-subscript)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-subscript"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:43:10 +00:00
James Collins
db1821bcef Merge pull request #564 from STEMMechanics/copilot/add-code-styling-setup
Add Laravel Pint configuration for Shift compatibility
2026-01-29 15:16:17 +10:00
copilot-swe-agent[bot]
62583c4869 Fix pint.json: remove incorrect braces rule setting
Co-authored-by: nomadjimbob <26953208+nomadjimbob@users.noreply.github.com>
2026-01-29 05:13:01 +00:00
copilot-swe-agent[bot]
066b7b1790 Add code style documentation to README
Co-authored-by: nomadjimbob <26953208+nomadjimbob@users.noreply.github.com>
2026-01-29 05:12:18 +00:00
copilot-swe-agent[bot]
d38422e16c Add Laravel Pint configuration and composer scripts
Co-authored-by: nomadjimbob <26953208+nomadjimbob@users.noreply.github.com>
2026-01-29 05:11:55 +00:00
copilot-swe-agent[bot]
ed22521e6f Initial plan 2026-01-29 05:10:08 +00:00
James Collins
3218f55a31 Merge pull request #562 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-underline-3.18.0
Bump @tiptap/extension-underline from 3.17.1 to 3.18.0
2026-01-29 14:00:50 +10:00
dependabot[bot]
be1fa8f432 Bump @tiptap/extension-underline from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-underline](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-underline) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-underline/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-underline)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-underline"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 04:00:02 +00:00
James Collins
c0c572397a Merge pull request #561 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-link-3.18.0
Bump @tiptap/extension-link from 3.17.1 to 3.18.0
2026-01-29 13:59:10 +10:00
James Collins
049d4849aa Merge pull request #560 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-superscript-3.18.0
Bump @tiptap/extension-superscript from 3.17.1 to 3.18.0
2026-01-29 13:58:58 +10:00
James Collins
e89656367f Merge pull request #559 from STEMMechanics/dependabot/composer/phpunit/phpunit-12.5.8
Bump phpunit/phpunit from 10.5.62 to 12.5.8
2026-01-29 13:58:41 +10:00
dependabot[bot]
e910ef7e84 Bump phpunit/phpunit from 10.5.62 to 12.5.8
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.62 to 12.5.8.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/12.5.8/ChangeLog-12.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.62...12.5.8)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 12.5.8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 03:58:02 +00:00
dependabot[bot]
db0e927056 Bump @tiptap/extension-link from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-link](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-link) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-link/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-link)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-link"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 03:57:20 +00:00
James Collins
cec55028d6 Merge pull request #557 from STEMMechanics/dependabot/composer/livewire/livewire-4.1.0 2026-01-29 13:57:08 +10:00
James Collins
0ae09c40ae Merge pull request #556 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-highlight-3.18.0
Bump @tiptap/extension-highlight from 3.17.1 to 3.18.0
2026-01-29 13:56:18 +10:00
James Collins
1cf2ec1ce7 Merge pull request #555 from STEMMechanics/dependabot/composer/laravel/framework-12.49.0
Bump laravel/framework from 12.48.1 to 12.49.0
2026-01-29 13:56:06 +10:00
dependabot[bot]
693df3a05b Bump @tiptap/extension-superscript from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-superscript](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-superscript) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-superscript/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-superscript)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-superscript"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:35 +00:00
dependabot[bot]
c0d1913660 Bump livewire/livewire from 3.7.6 to 4.1.0
Bumps [livewire/livewire](https://github.com/livewire/livewire) from 3.7.6 to 4.1.0.
- [Release notes](https://github.com/livewire/livewire/releases)
- [Commits](https://github.com/livewire/livewire/compare/v3.7.6...v4.1.0)

---
updated-dependencies:
- dependency-name: livewire/livewire
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:20 +00:00
dependabot[bot]
8c387280a6 Bump @tiptap/extension-highlight from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-highlight](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-highlight) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-highlight/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-highlight)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-highlight"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:11 +00:00
dependabot[bot]
a1ab7b6257 Bump laravel/framework from 12.48.1 to 12.49.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 12.48.1 to 12.49.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/12.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v12.48.1...v12.49.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-version: 12.49.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:07 +00:00
James Collins
36d4f08aaf Merge pull request #554 from STEMMechanics/dependabot/composer/symfony/process-7.4.5
Bump symfony/process from 7.4.4 to 7.4.5
2026-01-29 07:50:12 +10:00
dependabot[bot]
f7de4f49d3 Bump symfony/process from 7.4.4 to 7.4.5
Bumps [symfony/process](https://github.com/symfony/process) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v7.4.4...v7.4.5)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-version: 7.4.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 21:39:53 +00:00
James Collins
06018c405d Merge pull request #553 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.5.62
Bump phpunit/phpunit from 10.5.61 to 10.5.62
2026-01-28 16:24:47 +10:00
dependabot[bot]
03c17200a0 Bump phpunit/phpunit from 10.5.61 to 10.5.62
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.61 to 10.5.62.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.62/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.61...10.5.62)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 10.5.62
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 04:44:31 +00:00
519c2a0fec update to php 8.4 2026-01-28 14:43:38 +10:00
James Collins
2b8788f716 Merge pull request #552 from STEMMechanics/dependabot/npm_and_yarn/axios-1.13.4
Bump axios from 1.13.3 to 1.13.4
2026-01-28 14:33:55 +10:00
dependabot[bot]
72be071536 Bump axios from 1.13.3 to 1.13.4
Bumps [axios](https://github.com/axios/axios) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.3...v1.13.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 00:43:12 +00:00
37b923fbda use important on hidden for placeholder 2026-01-27 20:30:01 +10:00
github-actions[bot]
292901a02e Dependency update 2026-01-26 20:19:20 +00:00
github-actions[bot]
12a6629a4b Dependency update 2026-01-19 20:17:13 +00:00
9d9a8ed9f5 exclude vendor in tests 2026-01-15 08:56:12 +10:00
1a03fed3bd added snyk test 2026-01-15 08:54:06 +10:00
43e66b2004 path traversal in chunk unlink fix 2026-01-15 08:33:38 +10:00
8babb4c836 added unlink safeguard 2026-01-15 08:28:41 +10:00
4eb3dfbb64 fix potential path traversal 2026-01-15 08:23:03 +10:00
33d390a612 fix open redirect 2026-01-15 08:01:05 +10:00
cad78c30ae added peer dependency 2026-01-15 07:57:10 +10:00
f8acdae237 fix path traversal risk 2026-01-15 07:56:32 +10:00
github-actions[bot]
63582dc306 Dependency update 2026-01-12 20:17:47 +00:00
github-actions[bot]
c96fb95f27 Dependency update 2026-01-05 20:18:40 +00:00
1160c8b077 holiday message 2026-01-01 09:11:28 +10:00
a4b3405f8a vite update 2026-01-01 09:06:16 +10:00
9d5396ca9a tiptap and vite update 2026-01-01 09:02:08 +10:00
de1483d409 tiptap update 2026-01-01 09:01:15 +10:00
James Collins
a37386565a Merge pull request #530 from STEMMechanics/dependabot/npm_and_yarn/laravel-vite-plugin-2.0.1
Bump laravel-vite-plugin from 1.3.0 to 2.0.1
2026-01-01 08:46:08 +10:00
dependabot[bot]
ff8b6549ce Bump laravel-vite-plugin from 1.3.0 to 2.0.1
Bumps [laravel-vite-plugin](https://github.com/laravel/vite-plugin) from 1.3.0 to 2.0.1.
- [Release notes](https://github.com/laravel/vite-plugin/releases)
- [Changelog](https://github.com/laravel/vite-plugin/blob/2.x/CHANGELOG.md)
- [Upgrade guide](https://github.com/laravel/vite-plugin/blob/2.x/UPGRADE.md)
- [Commits](https://github.com/laravel/vite-plugin/compare/v1.3.0...v2.0.1)

---
updated-dependencies:
- dependency-name: laravel-vite-plugin
  dependency-version: 2.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 22:18:17 +00:00
github-actions[bot]
d550bc60e2 Dependency update 2025-12-31 21:02:22 +00:00
James Collins
307573a3a8 Update workflow to commit changes directly
Replaced the Create PR step with a Commit and push step to directly commit changes to the main branch.
2026-01-01 07:01:35 +10:00
James Collins
d9fc6c95f3 Update PHP version in dependency update workflow 2026-01-01 06:58:23 +10:00
James Collins
a65f0eead6 Add workflow for automated dependency updates 2026-01-01 06:56:13 +10:00
ca025ca2e8 dependency updates 2025-12-23 10:39:55 +10:00
74aef68edc remove posts reference 2025-12-23 10:34:05 +10:00
c0e595f88a dependency updates 2025-11-27 10:15:26 +10:00
aab4bc0d46 dependency updates 2025-11-26 10:10:57 +10:00
f2708e1325 dependency updates 2025-11-19 10:32:18 +10:00
James Collins
2e2b70ab7c Merge pull request #533 from STEMMechanics/dependabot/npm_and_yarn/multi-74f7c1f85a
Bump esbuild and vite
2025-11-19 10:28:45 +10:00
dependabot[bot]
e42d54554a Bump esbuild and vite
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.12 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.21.5 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.12)

Updates `vite` from 5.4.21 to 7.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: indirect
- dependency-name: vite
  dependency-version: 7.2.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 00:25:53 +00:00
6cb24f1500 dependency updates 2025-11-19 10:24:23 +10:00
f7cc086f37 added jenkins link 2025-11-19 10:23:05 +10:00
8463da7842 opacity fixes 2025-11-17 09:26:48 +10:00
James Collins
322d547c92 Merge pull request #526 from STEMMechanics/laravel12
laravel 12 upgrade
2025-11-17 09:09:10 +10:00
30104ece71 laravel 12 upgrade 2025-11-17 09:08:07 +10:00
44f359ff9c fix timings 2025-11-16 23:15:49 +10:00
20f36d519a fix timings 2025-11-16 23:14:55 +10:00
e358e9fb5d fix timings 2025-11-16 23:13:28 +10:00
b882d92328 fix timings 2025-11-16 23:08:34 +10:00
3257aa9ee9 added bot checks 2025-11-16 23:04:50 +10:00
0bcd6f5e86 added bot checks 2025-11-16 23:00:21 +10:00
75d958856a rename controller 2025-11-16 22:59:07 +10:00
71eb00d010 unsubscribe fixes 2025-11-16 22:56:16 +10:00
eab3d062f5 unsubscribe fixes 2025-11-16 22:48:17 +10:00
1afa22e2f4 logging 2025-11-16 22:19:40 +10:00
b85d039c36 fix var name 2025-11-16 22:14:04 +10:00
c1a4fd13d5 fix var name 2025-11-16 22:04:01 +10:00
9a1ffe835c fix var name 2025-11-16 22:02:32 +10:00
c3b9482d35 obsolete directives 2025-11-16 22:00:14 +10:00
bc8f9149dc fix unsubscribe link 2025-11-16 21:57:41 +10:00
c60213257b force SSL 2025-11-16 21:41:14 +10:00
6a78ba2bb2 composer updates 2025-11-16 21:12:40 +10:00
a5f7ce8393 updated subscription elements 2025-11-16 21:10:34 +10:00
4e1505c5c2 updated subscription elements 2025-11-16 19:07:07 +10:00
e967bdde71 updated footer and added about page 2025-11-16 16:20:41 +10:00
74e9e39722 updated address 2025-11-16 16:02:34 +10:00
0df4033fca package updates 2025-11-16 15:41:11 +10:00
e02770cc85 added roave/security-advisories 2025-11-16 15:32:35 +10:00
3687af2656 remove blog posts 2025-11-16 15:31:29 +10:00
b168931266 upgraded packages 2025-11-10 16:46:10 +10:00
b669dd319e fixed bad left offset of backdrop in dropdown 2025-11-10 16:43:26 +10:00
e37b9a30a4 dependency updates 2025-08-28 20:17:42 +10:00
436d4b8acf update 2025-08-28 20:12:49 +10:00
a2eb1d5d1b search bar focus and select fix 2025-08-28 20:12:31 +10:00
be4fdb2f80 updated to handle local caching 2025-08-28 20:03:30 +10:00
538f324ff4 captcha cleanup and added 2fa logins 2024-09-28 11:51:28 +10:00
59ca73519d added instructions 2024-09-28 09:23:16 +10:00
6bc2b888a4 change timer 2024-09-28 09:18:43 +10:00
be8b2d48b3 update newsletter schedule 2024-09-27 22:38:11 +10:00
5f631a5c3d remove user data 2024-09-27 22:26:58 +10:00
fea3756eab fix bad checkbox variable 2024-09-27 22:26:25 +10:00
6d8db2cd80 fix bad variable name 2024-09-27 22:23:57 +10:00
9725f4944f fix bad variable name 2024-09-27 22:23:01 +10:00
9b1b92d0cf added email subscriptions 2024-09-27 22:17:39 +10:00
b10b6b712e added email subscriptions 2024-09-27 22:16:29 +10:00
db018e9120 fix invalid tag 2024-09-27 19:58:57 +10:00
1444bc9aa4 fallback if firstname is missing 2024-09-27 19:56:32 +10:00
9e7fc79fa1 add search option to navbar slide out 2024-09-27 18:08:25 +10:00
06460d9677 update home to shipping address 2024-09-27 18:04:12 +10:00
beed9f9c11 update home to shipping address 2024-09-27 17:59:27 +10:00
38b3d5d367 positioning updates 2024-09-27 17:30:00 +10:00
ad080b19a2 fix asset links 2024-09-27 14:47:59 +10:00
274d9759b6 fix small screen layouts 2024-09-27 14:26:46 +10:00
d992570ee8 fix number formatting 2024-09-27 14:22:18 +10:00
d72c08b4c9 fix selection 2024-09-27 14:22:03 +10:00
7baea36628 fix single decimal point pricing 2024-09-27 13:39:59 +10:00
b20c79b679 updated search and added past workshop page 2024-09-27 13:33:50 +10:00
5cbebd8840 remove 2024-09-27 11:26:24 +10:00
d36979cbbd updated 2024-09-27 11:25:49 +10:00
1c28cd7902 updated 2024-09-27 11:24:55 +10:00
df19e43112 update includes 2024-09-27 11:24:47 +10:00
5a65517d2b added past index route 2024-09-27 11:19:32 +10:00
49eb388041 updated mast to support tabs 2024-09-27 11:17:49 +10:00
659ae2e3ac bts update 2024-09-27 10:27:54 +10:00
8f8d12065d change workshop table to events 2024-05-07 15:00:32 +10:00
391b17c1e7 download and close buttons in gallery 2024-05-07 08:24:17 +10:00
742da4bf17 updated tokens and emails 2024-05-06 20:13:31 +10:00
39ea570f3a email still required to be unique 2024-05-06 10:46:38 +10:00
714a15e6d0 allow empty fields by admin 2024-05-06 10:45:49 +10:00
a5e4e93edb reject emails already in use 2024-05-06 10:45:38 +10:00
5f166deee9 remove unused variable 2024-05-04 18:08:45 +10:00
2468bff5fb no decimals for KB and bytes 2024-05-04 18:08:05 +10:00
277805044a keep gallery order 2024-05-04 17:25:20 +10:00
680be0535d keep gallery order 2024-05-04 17:21:07 +10:00
b438846c3c dependency updates 2024-05-04 14:44:52 +10:00
6a76dacdae fix overlapping pages on PDF thumbnail generation 2024-05-04 14:42:23 +10:00
3358cf8dea fix default name 2024-05-04 14:21:35 +10:00
7b6e17ba40 hide hidden field 2024-05-04 14:19:25 +10:00
3e891912b0 fix issues with scripts rendering 2024-05-04 14:18:17 +10:00
53d0c46aa0 updates 2024-05-04 13:49:44 +10:00
e4d5307dfe updates 2024-05-04 13:48:21 +10:00
28aebcfe58 set default publish to now 2024-05-04 13:42:22 +10:00
cdc5d1e8d3 allow multiple components on page 2024-05-04 13:39:55 +10:00
4c7dadfab0 dull border 2024-05-03 21:00:01 +10:00
4ac1322b8c post table responsive 2024-05-02 11:47:23 +10:00
822838fe29 locations table responsive 2024-05-02 11:42:58 +10:00
fb4c8c240b fix navbar z-index on search bar 2024-05-02 11:39:12 +10:00
30e308466b update title size based on length 2024-05-01 21:06:40 +10:00
e1dcc7452b support null file list 2024-05-01 21:01:49 +10:00
76690962c5 add workshop duplication 2024-05-01 20:57:20 +10:00
629ae22b78 add videos file list 2024-05-01 20:27:23 +10:00
1e1df33711 dont generate variants if it already exists 2024-05-01 18:49:50 +10:00
f835d4a21b support stopmotionstudiomobile extension 2024-05-01 18:40:30 +10:00
1219c9a02e added updating thumbnails 2024-05-01 18:39:33 +10:00
bbffddf9ae cleanup file type 2024-05-01 18:25:18 +10:00
74cc11e124 check element exists first 2024-05-01 18:14:49 +10:00
b020f5cbb6 remove file from form 2024-05-01 18:03:49 +10:00
09bd9a22c9 fix user creation validation 2024-05-01 17:43:34 +10:00
ebf97a8242 fix search data 2024-05-01 14:44:50 +10:00
6d51cc1395 CSS for ul 2024-05-01 12:09:58 +10:00
ededb36856 dependency updates 2024-05-01 07:11:19 +10:00
b7ee043bf3 reverse order in search 2024-04-30 21:44:42 +10:00
48131d3064 added shortcuts 2024-04-30 21:35:28 +10:00
d4f3e24c33 added shortcuts 2024-04-30 21:31:52 +10:00
0f253e1047 added cancelled status 2024-04-30 15:37:41 +10:00
4d2f6de3c8 added cancelled status 2024-04-30 15:36:19 +10:00
346c945937 delete temp files 2024-04-30 08:34:56 +10:00
4391abaabb progress uploads 2024-04-30 07:40:08 +10:00
50169e9905 responsive forms 2024-04-29 22:19:10 +10:00
7a6a3ec2d8 save workshop files in workshop updates 2024-04-29 22:14:13 +10:00
5d715b096f cleanup filelist display 2024-04-29 22:12:08 +10:00
c696a8bd2e refactor file uploading and add media picker errors 2024-04-29 22:00:34 +10:00
d3bf78d5a8 added empty button 2024-04-29 20:16:24 +10:00
cd08c9a5c8 correct spacing for narrow images 2024-04-28 18:44:06 +10:00
bd8f453aea bypass password for admin 2024-04-28 18:36:03 +10:00
c719da2933 string starts with fix 2024-04-28 18:28:53 +10:00
a5184be13d added filetype 2024-04-28 18:25:31 +10:00
47a2afff86 added filetype 2024-04-28 18:24:56 +10:00
b8db85abca added getFileTypeAttribute() 2024-04-28 18:23:36 +10:00
67df8f85ff generic thumbnail for password protected files 2024-04-28 18:15:02 +10:00
6bb45c38a9 generic thumbnail for password protected files 2024-04-28 18:12:12 +10:00
02dbacbdc0 incorrect filename 2024-04-28 18:04:09 +10:00
bea4f8db18 add cmd to regenerate thumbnails 2024-04-28 18:00:33 +10:00
3919a3ce1c expand on thumbnail variants 2024-04-28 17:55:09 +10:00
d1b94f9183 ensure there is a thumbnail variant before returning url 2024-04-28 17:32:01 +10:00
bb440497eb dependency updates 2024-04-28 17:27:00 +10:00
4b87c5e112 remove debug 2024-04-28 17:25:39 +10:00
a2def6abc0 added media status and retry loading thumbnails 2024-04-28 17:25:10 +10:00
a5be12aee3 media picker responsive 2024-04-28 17:06:09 +10:00
e2fed71896 add responsive table 2024-04-28 16:26:02 +10:00
befebc44cb fix image distortion 2024-04-27 21:51:32 +10:00
b4456d7771 menu floating on mobile 2024-04-27 21:51:23 +10:00
c3350823dc table cleanup 2024-04-25 20:31:09 +10:00
96ba9edf6a fix text wrapping in pagination 2024-04-25 19:57:10 +10:00
39609edc9e better file password implementation 2024-04-25 18:40:40 +10:00
c702253837 change button name 2024-04-25 17:54:07 +10:00
bad020924d support for passworded files 2024-04-25 17:48:47 +10:00
a57be26b75 incorrect email 2024-04-25 15:11:10 +10:00
1d63186fd5 bugfix 2024-04-25 14:50:06 +10:00
6e9d14728d remove time 2024-04-25 14:41:18 +10:00
7c9dab2cf0 fix 2024-04-25 14:40:23 +10:00
885a909e57 dont create user is some cases 2024-04-25 14:35:22 +10:00
a26b669daa record extra register details in log 2024-04-25 14:27:18 +10:00
3bd3b30609 record extra register details in log 2024-04-25 14:27:09 +10:00
1201a6f0e6 record extra details in honeypot 2024-04-25 14:21:34 +10:00
8a32fc41a8 record extra details in honeypot 2024-04-25 14:16:16 +10:00
6131b378b8 pass previous query values to paginate 2024-04-25 14:09:11 +10:00
2a80a1ad62 remove rules page 2024-04-24 23:30:09 +10:00
4e0e7f6b7b added missing pages 2024-04-24 23:25:47 +10:00
7bc62d5600 margin on small screens 2024-04-24 22:59:14 +10:00
6208676207 update selectors 2024-04-24 22:34:28 +10:00
70f9d736d1 add gap between buttons 2024-04-24 22:10:43 +10:00
09c49ab279 variable checking 2024-04-24 22:07:33 +10:00
6ac8fb4f89 variable checking 2024-04-24 22:05:57 +10:00
3a2735f00d further bot checking 2024-04-24 22:01:29 +10:00
7b89fad650 check value 2024-04-24 21:48:15 +10:00
9bc3e5e963 check $post 2024-04-24 21:48:09 +10:00
ea10ead824 added honeypot 2024-04-24 21:41:47 +10:00
4a4b42bed0 fix missing view 2024-04-24 21:01:02 +10:00
1053fbc797 fix missing view 2024-04-24 20:50:43 +10:00
988dbd4edc cleanup 2024-04-24 19:39:33 +10:00
4c9d1667b6 added 2024-04-24 18:07:17 +10:00
2b924fac4b removed from project 2024-04-24 18:06:38 +10:00
18e0a2afd2 don't include .idea 2024-04-24 18:04:43 +10:00
558a432960 dependency updates 2024-04-24 18:01:55 +10:00
f46dbd887b fix workshop order 2024-04-24 17:56:40 +10:00
50de666304 add responsive 2024-04-24 07:18:17 +10:00
d592f8bd19 bugfixes 2024-04-24 07:16:04 +10:00
d2b69061b5 added thumbnails and download link 2024-04-24 07:11:03 +10:00
b24fa48d85 only need lg images 2024-04-23 21:41:04 +10:00
28b2ffa4a3 only need lg images 2024-04-23 21:38:45 +10:00
4a45c0f505 add gzip and expires 2024-04-23 21:38:36 +10:00
f7e7ed9d7a use medium image size 2024-04-23 21:17:42 +10:00
232f737a10 fix up the sort order on the workshops page 2024-04-23 20:51:10 +10:00
feecd0d7f5 dont show private events on front page 2024-04-23 19:33:16 +10:00
2d872ae289 update display 2024-04-23 19:31:47 +10:00
d6b6cb49cf add private event support 2024-04-23 19:13:42 +10:00
735d39f52e fix responsive design 2024-04-23 19:02:39 +10:00
46faf195a7 add default age 2024-04-23 17:04:26 +10:00
caff5c8160 support price of 0 2024-04-23 16:54:44 +10:00
39d5b29ed3 add double click support to media picker 2024-04-23 16:47:08 +10:00
b4f3fa6d07 html entity support 2024-04-23 15:22:26 +10:00
eae8af936b support restarting upload 2024-04-23 15:01:17 +10:00
257e241aea add url features 2024-04-23 14:34:58 +10:00
2587ea624a incorrect variable name 2024-04-23 14:23:05 +10:00
8cd19f6b8a incorrect variable name 2024-04-23 14:21:18 +10:00
8dea8e5995 detect filenames that are postfixed with a copy number indicator 2024-04-23 14:18:34 +10:00
dedcf1a379 fix padding of datetime-local inputs on webkit 2024-04-23 14:07:23 +10:00
2e0df186c6 title was not amended 2024-04-23 14:07:08 +10:00
2e39b9cb2a show the file count on uploading 2024-04-23 13:28:49 +10:00
0e19f6da87 clean filename 2024-04-23 12:33:37 +10:00
34092291dd better percentage display 2024-04-23 12:33:28 +10:00
67f2967823 support chunk uploading 2024-04-23 12:18:16 +10:00
33f0d83cf7 fix path for unknown.webp 2024-04-23 11:28:17 +10:00
3a35c28f1d dependency updates 2024-04-23 11:19:59 +10:00
2a1db0b088 return unknown.webp file if the requested file does not exist 2024-04-23 11:14:54 +10:00
79fb978127 show correct thumbnail when uploading file 2024-04-23 11:14:35 +10:00
9e2cfd8abc dont allow escape key on progress window 2024-04-23 11:08:00 +10:00
88889ca329 use thumbnails 2024-04-23 10:28:29 +10:00
aed29200a7 fix incrementing and automatic titling 2024-04-23 10:21:14 +10:00
d6b03826c1 added filenameToTitle 2024-04-23 10:20:55 +10:00
0a99b1789b auto select added files 2024-04-23 10:16:15 +10:00
80bc35bf4c show new name 2024-04-23 10:16:05 +10:00
f0ae8cd7ad update the value on load 2024-04-23 09:37:06 +10:00
6dbc9f0281 bugfix with file lists 2024-04-23 09:28:42 +10:00
88b1dcdfae bugfix with array types 2024-04-23 09:20:36 +10:00
ff811d961f hide files title if no files and not editing 2024-04-23 09:10:25 +10:00
633e0557f6 dont parse array 2024-04-23 08:39:46 +10:00
bdf8846278 handle arrays 2024-04-23 08:38:16 +10:00
f0d3e739f8 remove invalid method 2024-04-23 08:14:58 +10:00
00afc7a1d3 support collections 2024-04-23 08:12:56 +10:00
71f048fb00 keep files in order! 2024-04-23 07:59:57 +10:00
fd72954165 order by title 2024-04-23 07:54:02 +10:00
da90616aa0 use correct logo 2024-04-23 07:53:56 +10:00
566092a567 use correct logo 2024-04-23 07:51:16 +10:00
ef5e35229c update media entry 2024-04-23 07:48:35 +10:00
005b29ff5a use new thumbnails 2024-04-23 02:54:16 +10:00
2203731ed8 fix trailing / 2024-04-23 02:45:59 +10:00
f59265cc00 update background image url 2024-04-23 02:23:50 +10:00
0eab9ba2ce expand space 2024-04-23 02:20:24 +10:00
e2f18a87b8 only italic on update of file 2024-04-23 02:18:05 +10:00
27941b2017 only show rename info on update of file 2024-04-23 02:17:19 +10:00
b60e368cb9 json support for store 2024-04-23 01:53:06 +10:00
a1d966327f update mail logo 2024-04-23 01:39:45 +10:00
07ab627af4 fix non defined variable in create 2024-04-22 20:44:22 +10:00
b84f78b00b no decimal places 2024-04-22 20:34:01 +10:00
d6a84e2496 change env to config 2024-04-22 20:32:36 +10:00
3ea9cbda9e removal dark mode 2024-04-22 19:59:03 +10:00
363d8cfcdb update configuration 2024-04-22 19:53:10 +10:00
32f7770e75 refactor assets 2024-04-22 18:53:40 +10:00
53df7d2fbe refactor assets 2024-04-22 18:42:19 +10:00
550bdd8249 make timestamps nullable 2024-04-22 18:26:33 +10:00
55462d0437 remove extra seed 2024-04-22 18:26:25 +10:00
5b7da699bd updated to laravel 11 2024-04-22 18:16:33 +10:00
5fbca80a3c disable Intervention\Image\ImageServiceProvider::class 2024-04-04 20:59:59 +10:00
4fa1410790 dependency updates 2024-04-04 20:33:31 +10:00
411fc5f37f dependency updates 2024-04-04 20:22:09 +10:00
f7c20719f7 dependency updates 2024-04-04 20:18:43 +10:00
e5a7aeede8 Merge pull request #431 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.19.1 2024-01-26 19:48:06 +10:00
dependabot[bot]
cfbf3a4033 Bump @typescript-eslint/parser from 6.19.0 to 6.19.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.19.0 to 6.19.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.19.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 09:47:25 +00:00
89cda7c415 Merge pull request #436 from STEMMechanics/dependabot/composer/doctrine/dbal-3.8.0 2024-01-26 19:47:21 +10:00
e211436675 Merge pull request #435 from STEMMechanics/dependabot/npm_and_yarn/dotenv-16.4.1 2024-01-26 19:47:09 +10:00
d1be96a1df Merge pull request #434 from STEMMechanics/dependabot/composer/laravel/sail-1.27.2 2024-01-26 19:46:59 +10:00
dependabot[bot]
7e87312d99 Bump laravel/sail from 1.27.1 to 1.27.2
Bumps [laravel/sail](https://github.com/laravel/sail) from 1.27.1 to 1.27.2.
- [Release notes](https://github.com/laravel/sail/releases)
- [Changelog](https://github.com/laravel/sail/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sail/compare/v1.27.1...v1.27.2)

---
updated-dependencies:
- dependency-name: laravel/sail
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 09:45:36 +00:00
dependabot[bot]
73c277acfb Bump dotenv from 16.3.1 to 16.4.1
Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.3.1 to 16.4.1.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.4.1)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 09:45:31 +00:00
0728233206 Merge pull request #430 from STEMMechanics/dependabot/npm_and_yarn/vitejs/plugin-vue-5.0.3 2024-01-26 19:45:07 +10:00
b127ce0514 Merge pull request #429 from STEMMechanics/dependabot/npm_and_yarn/knip-4.2.1 2024-01-26 19:44:57 +10:00
5924222296 Merge pull request #428 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.19.1 2024-01-26 19:44:45 +10:00
6d2c601b5d Merge pull request #427 from STEMMechanics/dependabot/composer/laravel/pint-1.13.10 2024-01-26 19:43:32 +10:00
f2fb993596 Merge pull request #426 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.5.9 2024-01-26 19:43:08 +10:00
c40232099f Merge pull request #425 from STEMMechanics/dependabot/composer/intervention/image-3.3.1 2024-01-26 19:42:48 +10:00
dependabot[bot]
17d33a9ad2 Bump doctrine/dbal from 3.7.2 to 3.8.0
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 3.7.2 to 3.8.0.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/3.7.2...3.8.0)

---
updated-dependencies:
- dependency-name: doctrine/dbal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 00:25:53 +00:00
dependabot[bot]
e380bafbb0 Bump @vitejs/plugin-vue from 4.6.2 to 5.0.3
Bumps [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue) from 4.6.2 to 5.0.3.
- [Release notes](https://github.com/vitejs/vite-plugin-vue/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-vue/commits/plugin-vue@5.0.3/packages/plugin-vue)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-vue"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:33:50 +00:00
dependabot[bot]
4c63e68625 Bump knip from 4.2.0 to 4.2.1
Bumps [knip](https://github.com/webpro/knip/tree/HEAD/packages/knip) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/webpro/knip/releases)
- [Commits](https://github.com/webpro/knip/commits/4.2.1/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:33:39 +00:00
dependabot[bot]
8b5d150fe2 Bump @typescript-eslint/eslint-plugin from 6.19.0 to 6.19.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.19.0 to 6.19.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.19.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:33:30 +00:00
dependabot[bot]
10808f3622 Bump laravel/pint from 1.13.9 to 1.13.10
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.13.9 to 1.13.10.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.13.9...v1.13.10)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:27:26 +00:00
dependabot[bot]
37ba8f0f29 Bump phpunit/phpunit from 10.5.8 to 10.5.9
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.8 to 10.5.9.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.9/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.8...10.5.9)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:27:18 +00:00
dependabot[bot]
51fb0150d9 Bump intervention/image from 3.3.0 to 3.3.1
Bumps [intervention/image](https://github.com/Intervention/image) from 3.3.0 to 3.3.1.
- [Commits](https://github.com/Intervention/image/compare/3.3.0...3.3.1)

---
updated-dependencies:
- dependency-name: intervention/image
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 00:27:11 +00:00
James Collins
03dd12cea1 Merge pull request #423 from STEMMechanics/dependabot/npm_and_yarn/vitest-1.2.1
Bump vitest from 0.34.6 to 1.2.1
2024-01-22 12:08:26 +10:00
dependabot[bot]
56ae719a2e Bump vitest from 0.34.6 to 1.2.1
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.34.6 to 1.2.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.2.1/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 02:07:55 +00:00
James Collins
68b7e50b9e Merge pull request #422 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-48.0.2
Bump eslint-plugin-jsdoc from 46.10.1 to 48.0.2
2024-01-22 12:07:27 +10:00
James Collins
386e2009c4 Merge pull request #421 from STEMMechanics/dependabot/npm_and_yarn/knip-4.2.0
Bump knip from 2.43.0 to 4.2.0
2024-01-22 12:07:15 +10:00
James Collins
3da55bca81 Merge pull request #420 from STEMMechanics/dependabot/npm_and_yarn/vite-5.0.12
Bump vite from 4.5.1 to 5.0.12
2024-01-22 12:06:58 +10:00
dependabot[bot]
5d8f1457d4 Bump vite from 4.5.1 to 5.0.12
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.1 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:42:15 +00:00
James Collins
39d9ebc549 Merge pull request #419 from STEMMechanics/dependabot/composer/intervention/image-3.3.0
Bump intervention/image from 2.7.2 to 3.3.0
2024-01-22 11:41:32 +10:00
James Collins
b2f3664909 Merge pull request #418 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.5.8
Bump phpunit/phpunit from 10.5.7 to 10.5.8
2024-01-22 11:41:15 +10:00
James Collins
06c2f0e3d0 Merge pull request #417 from STEMMechanics/dependabot/npm_and_yarn/vite-4.5.2
Bump vite from 4.5.1 to 4.5.2
2024-01-22 11:40:54 +10:00
dependabot[bot]
2d2392c8ae Bump intervention/image from 2.7.2 to 3.3.0
Bumps [intervention/image](https://github.com/Intervention/image) from 2.7.2 to 3.3.0.
- [Commits](https://github.com/Intervention/image/compare/2.7.2...3.3.0)

---
updated-dependencies:
- dependency-name: intervention/image
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:22:46 +00:00
dependabot[bot]
5e7061bc61 Bump vite from 4.5.1 to 4.5.2
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:20:29 +00:00
James Collins
8451a2bd4b Merge pull request #415 from STEMMechanics/dependabot/npm_and_yarn/prettier-3.2.4
Bump prettier from 3.0.3 to 3.2.4
2024-01-22 11:11:23 +10:00
James Collins
dd135f10ec Merge pull request #413 from STEMMechanics/dependabot/composer/square/square-34.0.1.20240118
Bump square/square from 32.0.0.20231018 to 34.0.1.20240118
2024-01-22 11:11:00 +10:00
dependabot[bot]
247eb03cea Bump eslint-plugin-jsdoc from 46.10.1 to 48.0.2
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.10.1 to 48.0.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.10.1...v48.0.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:10:49 +00:00
dependabot[bot]
19c16cfbf1 Bump square/square from 32.0.0.20231018 to 34.0.1.20240118
Bumps [square/square](https://github.com/square/square-php-sdk) from 32.0.0.20231018 to 34.0.1.20240118.
- [Release notes](https://github.com/square/square-php-sdk/releases)
- [Changelog](https://github.com/square/square-php-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/square-php-sdk/compare/32.0.0.20231018...34.0.1.20240118)

---
updated-dependencies:
- dependency-name: square/square
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:10:22 +00:00
dependabot[bot]
456687edc5 Bump knip from 2.43.0 to 4.2.0
Bumps [knip](https://github.com/webpro/knip/tree/HEAD/packages/knip) from 2.43.0 to 4.2.0.
- [Release notes](https://github.com/webpro/knip/releases)
- [Commits](https://github.com/webpro/knip/commits/4.2.0/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:10:18 +00:00
James Collins
aab63bb627 Merge pull request #397 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.58.3
Bump unocss from 0.57.7 to 0.58.3
2024-01-22 11:06:09 +10:00
dependabot[bot]
efb3cac129 Bump unocss from 0.57.7 to 0.58.3
Bumps [unocss](https://github.com/unocss/unocss) from 0.57.7 to 0.58.3.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.57.7...v0.58.3)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 01:03:28 +00:00
James Collins
36314339fb Merge pull request #361 from STEMMechanics/dependabot/composer/guzzlehttp/guzzle-7.8.1
Bump guzzlehttp/guzzle from 7.8.0 to 7.8.1
2024-01-22 10:49:10 +10:00
dependabot[bot]
c6247e445f Bump phpunit/phpunit from 10.5.7 to 10.5.8
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.7 to 10.5.8.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.8/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.7...10.5.8)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 00:44:40 +00:00
b028856eb5 php 8.2 now required 2024-01-19 10:04:51 +10:00
1925b2ef0c dependency updates 2024-01-19 09:53:52 +10:00
dependabot[bot]
0d1bd4522e Bump prettier from 3.0.3 to 3.2.4
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 00:55:39 +00:00
f2e84b63fa dependency updates 2024-01-15 09:02:21 +10:00
ac6257ed6d vs settings change 2024-01-15 09:02:16 +10:00
2486dec824 added rel="nofollow" to download links 2024-01-15 09:01:36 +10:00
04e6c0d0fc fix bad param 2024-01-06 15:57:46 +10:00
b948c42fe2 check if file_security is missing 2024-01-06 15:57:39 +10:00
5d7be1a482 dependency updates 2024-01-06 15:57:22 +10:00
4e81d06a6e dep updates 2023-12-25 19:23:46 +10:00
dependabot[bot]
0f2400ff2b Bump guzzlehttp/guzzle from 7.8.0 to 7.8.1
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.8.0 to 7.8.1.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.8/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.8.0...7.8.1)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 00:54:13 +00:00
7ed2332a3e dependency updates 2023-12-01 10:52:49 +10:00
James Collins
c432b32d08 Merge pull request #319 from STEMMechanics/dependabot/composer/laravel/framework-10.30.1
Bump laravel/framework from 10.30.0 to 10.30.1
2023-11-02 10:39:26 +10:00
James Collins
8cf628153c Merge pull request #318 from STEMMechanics/dependabot/npm_and_yarn/knip-2.38.6
Bump knip from 2.38.4 to 2.38.6
2023-11-02 10:38:24 +10:00
dependabot[bot]
ab0bd9e7d9 Bump laravel/framework from 10.30.0 to 10.30.1
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.30.0 to 10.30.1.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.30.0...v10.30.1)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 00:26:04 +00:00
dependabot[bot]
51cd70f2ec Bump knip from 2.38.4 to 2.38.6
Bumps [knip](https://github.com/webpro/knip) from 2.38.4 to 2.38.6.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.38.4...2.38.6)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 00:15:36 +00:00
235d4e3784 Merge pull request #317 from STEMMechanics/dependabot/composer/laravel/framework-10.30.0 2023-11-01 10:52:42 +10:00
dependabot[bot]
dd0bbad18f Bump laravel/framework from 10.29.0 to 10.30.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.29.0 to 10.30.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.29.0...v10.30.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 00:51:33 +00:00
f32059c3e7 Merge pull request #316 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.9.1 2023-10-31 11:24:17 +10:00
dependabot[bot]
92578ef738 Bump @typescript-eslint/parser from 6.9.0 to 6.9.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.0 to 6.9.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 01:21:23 +00:00
367205f955 Merge pull request #315 from STEMMechanics/dependabot/npm_and_yarn/eslint-8.52.0 2023-10-31 11:20:58 +10:00
1fdf36669f Merge pull request #314 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.9.1 2023-10-31 11:20:43 +10:00
dependabot[bot]
dfa06b148f Bump eslint from 8.51.0 to 8.52.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 01:08:07 +00:00
dependabot[bot]
139b437118 Bump @typescript-eslint/eslint-plugin from 6.9.0 to 6.9.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.9.0 to 6.9.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 01:07:54 +00:00
4dca636359 Merge pull request #312 from STEMMechanics/dependabot/npm_and_yarn/vue-3.3.7 2023-10-30 15:59:16 +10:00
4f1d2a179b Merge pull request #311 from STEMMechanics/dependabot/npm_and_yarn/knip-2.38.4 2023-10-30 15:59:02 +10:00
dependabot[bot]
ede28f375a Bump knip from 2.35.0 to 2.38.4
Bumps [knip](https://github.com/webpro/knip) from 2.35.0 to 2.38.4.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.35.0...2.38.4)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 01:38:00 +00:00
dependabot[bot]
06dfb8d7f6 Bump vue from 3.3.4 to 3.3.7
Bumps [vue](https://github.com/vuejs/core) from 3.3.4 to 3.3.7.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.3.4...v3.3.7)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 01:37:46 +00:00
2d4090922f Merge pull request #313 from STEMMechanics/dependabot/npm_and_yarn/vite-plugin-compression2-0.11.0 2023-10-30 11:37:04 +10:00
3d58a09c21 Merge pull request #310 from STEMMechanics/dependabot/npm_and_yarn/sass-1.69.5 2023-10-30 11:36:40 +10:00
05da5f016c Merge pull request #309 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-vue-9.18.1 2023-10-30 11:36:27 +10:00
dependabot[bot]
256eead944 Bump vite-plugin-compression2 from 0.10.6 to 0.11.0
Bumps [vite-plugin-compression2](https://github.com/nonzzz/vite-plugin-compression) from 0.10.6 to 0.11.0.
- [Release notes](https://github.com/nonzzz/vite-plugin-compression/releases)
- [Changelog](https://github.com/nonzzz/vite-plugin-compression/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nonzzz/vite-plugin-compression/compare/v0.10.6...v0.11.0)

---
updated-dependencies:
- dependency-name: vite-plugin-compression2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 00:26:20 +00:00
dependabot[bot]
dcb8ffaa0d Bump sass from 1.69.4 to 1.69.5
Bumps [sass](https://github.com/sass/dart-sass) from 1.69.4 to 1.69.5.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.69.4...1.69.5)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 00:24:57 +00:00
dependabot[bot]
def671dd47 Bump eslint-plugin-vue from 9.17.0 to 9.18.1
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.17.0 to 9.18.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.17.0...v9.18.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 00:24:30 +00:00
717f360952 Merge pull request #302 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.9.0 2023-10-29 11:59:09 +10:00
dependabot[bot]
1c0b91f52c Bump @typescript-eslint/parser from 6.8.0 to 6.9.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-28 07:52:11 +00:00
c733d39d30 Merge pull request #301 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.9.0 2023-10-28 17:51:41 +10:00
87bdea3bba Merge pull request #308 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.4.2 2023-10-28 17:51:28 +10:00
efe80694f9 Merge pull request #307 from STEMMechanics/dependabot/composer/laravel/pint-1.13.5 2023-10-28 17:51:19 +10:00
be7e6ee400 Merge pull request #306 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.57.1 2023-10-28 17:51:09 +10:00
319a7b27c5 Merge pull request #304 from STEMMechanics/dependabot/composer/laravel/sail-1.26.0 2023-10-28 17:51:00 +10:00
dbe20ac724 Merge pull request #303 from STEMMechanics/dependabot/composer/laravel/framework-10.29.0 2023-10-28 17:50:51 +10:00
dependabot[bot]
dc6ed3f43a Bump @typescript-eslint/eslint-plugin from 6.8.0 to 6.9.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-28 07:50:16 +00:00
ecddb5c6d3 Merge pull request #299 from STEMMechanics/dependabot/npm_and_yarn/ls-lint/ls-lint-2.2.2 2023-10-28 17:49:35 +10:00
34e5a37e24 Merge pull request #297 from STEMMechanics/dependabot/composer/square/square-32.0.0.20231018 2023-10-28 17:49:23 +10:00
eaca6bcc72 Merge pull request #283 from STEMMechanics/dependabot/npm_and_yarn/vitejs/plugin-vue-4.4.0 2023-10-28 17:49:04 +10:00
dependabot[bot]
bad588d4b2 Bump phpunit/phpunit from 10.4.1 to 10.4.2
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.4.1 to 10.4.2.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.4.2/ChangeLog-10.4.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.4.1...10.4.2)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 01:15:59 +00:00
dependabot[bot]
d5daf20351 Bump laravel/pint from 1.13.3 to 1.13.5
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.13.3 to 1.13.5.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.13.3...v1.13.5)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 01:15:53 +00:00
dependabot[bot]
f512ab96fc Bump unocss from 0.55.7 to 0.57.1
Bumps [unocss](https://github.com/unocss/unocss) from 0.55.7 to 0.57.1.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.55.7...v0.57.1)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 01:10:26 +00:00
dependabot[bot]
0cfa9a5483 Bump laravel/sail from 1.25.0 to 1.26.0
Bumps [laravel/sail](https://github.com/laravel/sail) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/laravel/sail/releases)
- [Changelog](https://github.com/laravel/sail/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sail/compare/v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: laravel/sail
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 00:17:49 +00:00
dependabot[bot]
979f934f22 Bump laravel/framework from 10.28.0 to 10.29.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.28.0 to 10.29.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.28.0...v10.29.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 00:17:39 +00:00
dependabot[bot]
1fa5820550 Bump @ls-lint/ls-lint from 2.2.1 to 2.2.2
Bumps [@ls-lint/ls-lint](https://github.com/loeffel-io/ls-lint) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/loeffel-io/ls-lint/releases)
- [Commits](https://github.com/loeffel-io/ls-lint/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: "@ls-lint/ls-lint"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 01:09:34 +00:00
8233afa825 codesniffer fixes 2023-10-20 11:10:33 +10:00
ba6f67798d obsolete 2023-10-20 09:47:29 +10:00
daabbaa3e4 ignore codesniffer 2023-10-20 09:22:30 +10:00
caa68b24d6 dependency updates 2023-10-20 09:21:09 +10:00
114db744b4 better error handling 2023-10-19 19:20:17 +10:00
8c910ed5f3 show error 2023-10-19 19:02:37 +10:00
1ef4332df6 cleanup 2023-10-19 18:55:57 +10:00
6e98269a0b dependency updates 2023-10-19 18:55:57 +10:00
dependabot[bot]
c918b91438 Bump square/square from 30.0.0.20230816 to 32.0.0.20231018
Bumps [square/square](https://github.com/square/square-php-sdk) from 30.0.0.20230816 to 32.0.0.20231018.
- [Release notes](https://github.com/square/square-php-sdk/releases)
- [Changelog](https://github.com/square/square-php-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/square-php-sdk/compare/30.0.0.20230816...32.0.0.20231018)

---
updated-dependencies:
- dependency-name: square/square
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 00:19:35 +00:00
2a1e634b34 added YT Link 2023-10-04 08:20:19 +10:00
dependabot[bot]
d45165d759 Bump @vitejs/plugin-vue from 4.3.4 to 4.4.0
Bumps [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue) from 4.3.4 to 4.4.0.
- [Release notes](https://github.com/vitejs/vite-plugin-vue/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-vue/commits/plugin-vue@4.4.0/packages/plugin-vue)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-vue"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-03 00:51:18 +00:00
a0a885e004 fix media dialog title 2023-09-29 17:05:28 +10:00
52f7070311 bad comma 2023-09-29 17:03:11 +10:00
e0650da5e9 fix new getURLPath 2023-09-29 16:57:55 +10:00
bf5cf3bce4 fix public validation 2023-09-29 16:45:42 +10:00
07d1dc4955 home button 2023-09-29 16:23:26 +10:00
11db41b900 accept media or string 2023-09-29 16:02:57 +10:00
3bca959d49 set field to user friendly url 2023-09-29 16:00:56 +10:00
3fee673314 remove console.log 2023-09-29 15:59:23 +10:00
3121d12f3a sort media list in reverse 2023-09-29 15:55:35 +10:00
b8731c3f37 clear unneeded initalize 2023-09-29 13:20:26 +10:00
b445a42896 reload 2023-09-29 13:19:06 +10:00
dbab224a9d fix pageloading 2023-09-29 13:17:18 +10:00
03f9659243 reload 2023-09-29 13:15:45 +10:00
0fb56133ff reload 2023-09-29 13:12:44 +10:00
afa7ca629c reload 2023-09-29 13:10:30 +10:00
9a9c382d7f fix reload 2023-09-29 13:08:39 +10:00
518b8d67bc reload page 2023-09-29 13:04:54 +10:00
ff0f8194e0 remove debug 2023-09-29 13:01:44 +10:00
f84f982c29 add retry button 2023-09-29 13:00:30 +10:00
420d81866c back button detection 2023-09-29 12:53:24 +10:00
1cd78ce93a back button fix 2023-09-29 12:47:47 +10:00
7cae8af89a catch back button 2023-09-29 12:45:33 +10:00
5088cea413 reset mounted 2023-09-29 12:36:39 +10:00
d670d52083 catch bad selectors 2023-09-29 12:33:23 +10:00
004aa116fb allow security_data in the correct contexts 2023-09-29 12:22:48 +10:00
32a08e1e10 better handling of storage exists 2023-09-29 12:16:43 +10:00
30d39c5326 cleanup 2023-09-29 12:16:25 +10:00
8affea3360 ignore empty mime_types 2023-09-29 12:00:01 +10:00
3b6b4dc388 support null $medium 2023-09-29 11:58:11 +10:00
9a9e75d96d remove empty mime_type ignore 2023-09-29 11:57:54 +10:00
ad6e4f0a23 fix case where new media has no security type 2023-09-29 11:52:17 +10:00
f66bc6d8aa updated lock icons and small views 2023-09-29 11:47:28 +10:00
845bb4763b fix thumb always overriding 2023-09-29 11:31:26 +10:00
e476b203c7 add download query 2023-09-29 11:22:29 +10:00
dd163630cb dependency updates 2023-09-29 11:14:43 +10:00
5d8a5ede7d add security icons 2023-09-29 11:10:08 +10:00
35ccb03c2b cleanup of styling 2023-09-29 11:10:01 +10:00
f6df068787 fix bad local storage url 2023-09-29 11:01:37 +10:00
b60a3601cb urlencode variables 2023-09-29 11:01:28 +10:00
8676844930 fix security policy notification styling 2023-09-29 07:40:14 +10:00
7e80e19eec fix change password dialog 2023-09-29 07:34:29 +10:00
e21c7ce1d0 add defaults for missing filter data 2023-09-29 07:28:21 +10:00
42f2baca5e media security_type updates 2023-09-29 07:19:33 +10:00
d9c0c8f1d8 fix sqlite error with renameColumn 2023-09-28 20:23:38 +10:00
b98e184d32 dependency updates 2023-09-28 10:09:48 +10:00
f764466199 ensure duplicate media items are not readded 2023-09-28 10:06:53 +10:00
6adfd9f3fa complete secure files 2023-09-28 09:59:40 +10:00
dbf9db1c92 create generic variants and thumbnail for secure documents 2023-09-27 17:08:45 +10:00
6cb7a8cb43 update secure media backend 2023-09-25 19:36:44 +10:00
2913960bcb update dependencies 2023-09-25 15:33:37 +10:00
8d0382a279 added 2023-09-25 15:33:29 +10:00
aa5ef50ed0 push params 2023-09-14 21:56:42 +10:00
d87b869633 added url support 2023-09-14 21:53:00 +10:00
99782bdf67 added helper function 2023-09-14 21:52:52 +10:00
6fa459e88e fix margin 2023-09-14 21:34:43 +10:00
954f2beea7 dependency updates 2023-09-14 21:32:55 +10:00
f216413a23 pagination on bottom 2023-09-14 21:30:35 +10:00
63572a2740 fix query comparison 2023-09-14 08:35:01 +10:00
aeb7595166 no default date if filter params exist 2023-09-14 08:32:03 +10:00
f507d198a7 fix query operators 2023-09-14 08:24:34 +10:00
9b5166c570 remove unused componets 2023-09-13 20:10:46 +10:00
2271aae557 use rawurlencode 2023-09-13 20:08:53 +10:00
8ed07e539f use new urlencode function 2023-09-13 20:04:43 +10:00
b029574fa5 add URLEncode function 2023-09-13 20:04:37 +10:00
e9d903ce79 autoload urlencode 2023-09-13 20:04:30 +10:00
1c9100e5de page not found error 2023-09-13 19:55:47 +10:00
1a59ac955d encode url 2023-09-13 19:23:31 +10:00
4d8e58f920 added scratch icon 2023-09-13 19:13:22 +10:00
James Collins
55ce8e0d9e Merge pull request #246 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.7.0
Bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.0
2023-09-12 11:09:15 +10:00
dependabot[bot]
0d1a3f8dbf Bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 01:08:20 +00:00
James Collins
9687a3c7a8 Merge pull request #247 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.7.0
Bump @typescript-eslint/parser from 6.6.0 to 6.7.0
2023-09-12 11:07:38 +10:00
dependabot[bot]
471534021e Bump @typescript-eslint/parser from 6.6.0 to 6.7.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 00:53:48 +00:00
8c75abf16a add index to controller 2023-09-11 21:04:12 +10:00
472abaf30b use new routes 2023-09-11 21:04:02 +10:00
35426e1189 use new routes 2023-09-11 21:03:52 +10:00
6507d57424 change job to jobs and add index 2023-09-11 21:03:45 +10:00
4252878019 support the | (or) operator 2023-09-11 21:03:12 +10:00
James Collins
8451cc1547 Merge pull request #245 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.6.0
Bump eslint-plugin-jsdoc from 46.5.1 to 46.6.0
2023-09-11 11:24:52 +10:00
dependabot[bot]
70ecefb007 Bump eslint-plugin-jsdoc from 46.5.1 to 46.6.0
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.5.1 to 46.6.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.5.1...v46.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 01:15:29 +00:00
4e7be1a18c remove stale jobs 2023-09-10 21:16:00 +10:00
d1cc468dfa added clean temp files schedule 2023-09-10 21:06:00 +10:00
484512f2c7 fix spacing 2023-09-10 20:43:28 +10:00
83b4df3462 fix icon text 2023-09-10 20:34:39 +10:00
8ea46b4ea8 update message 2023-09-10 20:34:34 +10:00
a68faa11b0 increase max chunks count 2023-09-10 20:26:51 +10:00
541cd93c99 cleanup 2023-09-10 20:26:00 +10:00
c5a7982945 update file icons 2023-09-10 20:25:54 +10:00
5cee36453e Transferring to CDN, not Uploading 2023-09-10 20:13:12 +10:00
47ea87b614 improve upload progress indicator 2023-09-10 20:11:22 +10:00
4ad0df2c39 dependency updates 2023-09-10 20:11:11 +10:00
f2ff8398eb dont rotate non images/video 2023-09-10 20:06:48 +10:00
3f915d6964 fixes to uploading in chunks 2023-09-10 19:59:26 +10:00
3e6a9da0d1 media job now uses progress_max 2023-09-10 18:33:54 +10:00
James Collins
ca5f4ffd84 Merge pull request #244 from STEMMechanics/dependabot/npm_and_yarn/knip-2.22.0
Bump knip from 2.21.2 to 2.22.0
2023-09-08 11:19:41 +10:00
James Collins
b66f9f79d2 Merge pull request #243 from STEMMechanics/dependabot/composer/league/flysystem-aws-s3-v3-3.16.0
Bump league/flysystem-aws-s3-v3 from 3.15.0 to 3.16.0
2023-09-08 11:17:58 +10:00
dependabot[bot]
dc0bfe6d7a Bump knip from 2.21.2 to 2.22.0
Bumps [knip](https://github.com/webpro/knip) from 2.21.2 to 2.22.0.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.21.2...2.22.0)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 01:01:38 +00:00
dependabot[bot]
5de463bd02 Bump league/flysystem-aws-s3-v3 from 3.15.0 to 3.16.0
Bumps [league/flysystem-aws-s3-v3](https://github.com/thephpleague/flysystem-aws-s3-v3) from 3.15.0 to 3.16.0.
- [Commits](https://github.com/thephpleague/flysystem-aws-s3-v3/compare/3.15.0...3.16.0)

---
updated-dependencies:
- dependency-name: league/flysystem-aws-s3-v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 00:59:15 +00:00
James Collins
f3d858d785 Merge pull request #242 from STEMMechanics/dependabot/composer/laravel/pint-1.13.1
Bump laravel/pint from 1.13.0 to 1.13.1
2023-09-07 17:52:51 +10:00
dependabot[bot]
0e537a6b46 Bump laravel/pint from 1.13.0 to 1.13.1
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 00:21:35 +00:00
8d78b15751 block access to the .git directory 2023-09-06 12:25:03 +10:00
James Collins
e1fc2fa271 Merge pull request #239 from STEMMechanics/dependabot/npm_and_yarn/knip-2.21.2
Bump knip from 2.21.1 to 2.21.2
2023-09-06 11:08:00 +10:00
James Collins
27466ad3a6 Merge pull request #241 from STEMMechanics/dependabot/npm_and_yarn/tiptap/starter-kit-2.1.8
Bump @tiptap/starter-kit from 2.1.7 to 2.1.8
2023-09-06 11:06:48 +10:00
dependabot[bot]
f0d63b4120 Bump @tiptap/starter-kit from 2.1.7 to 2.1.8
Bumps [@tiptap/starter-kit](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/starter-kit) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v2.1.8/packages/starter-kit/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v2.1.8/packages/starter-kit)

---
updated-dependencies:
- dependency-name: "@tiptap/starter-kit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 01:00:47 +00:00
dependabot[bot]
163dd98b7b Bump knip from 2.21.1 to 2.21.2
Bumps [knip](https://github.com/webpro/knip) from 2.21.1 to 2.21.2.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.21.1...2.21.2)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 00:58:27 +00:00
8610a1678d dependency updates 2023-09-06 10:57:21 +10:00
James Collins
d20c7832da Merge pull request #234 from STEMMechanics/dependabot/composer/laravel/sail-1.24.1
Bump laravel/sail from 1.24.0 to 1.24.1
2023-09-06 10:45:38 +10:00
James Collins
fcba4015ed Merge pull request #233 from STEMMechanics/dependabot/composer/laravel/pint-1.13.0
Bump laravel/pint from 1.12.0 to 1.13.0
2023-09-06 10:45:25 +10:00
James Collins
bb34a3c33a Merge pull request #232 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.3.3
Bump phpunit/phpunit from 10.3.2 to 10.3.3
2023-09-06 10:45:13 +10:00
James Collins
dbded3ba14 Merge pull request #231 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.6.0
Bump @typescript-eslint/parser from 6.5.0 to 6.6.0
2023-09-06 10:44:59 +10:00
dependabot[bot]
3a654e0480 Bump laravel/sail from 1.24.0 to 1.24.1
Bumps [laravel/sail](https://github.com/laravel/sail) from 1.24.0 to 1.24.1.
- [Release notes](https://github.com/laravel/sail/releases)
- [Changelog](https://github.com/laravel/sail/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sail/compare/v1.24.0...v1.24.1)

---
updated-dependencies:
- dependency-name: laravel/sail
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 00:44:55 +00:00
James Collins
4b358fba4f Merge pull request #230 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-superscript-2.1.8
Bump @tiptap/extension-superscript from 2.1.7 to 2.1.8
2023-09-06 10:44:44 +10:00
dependabot[bot]
5aaeab686d Bump @typescript-eslint/parser from 6.5.0 to 6.6.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.6.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 00:43:06 +00:00
James Collins
5ff0a4e86f Merge pull request #229 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-highlight-2.1.8
Bump @tiptap/extension-highlight from 2.1.7 to 2.1.8
2023-09-06 10:42:52 +10:00
James Collins
0c866ed009 Merge pull request #228 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.6.0
Bump @typescript-eslint/eslint-plugin from 6.5.0 to 6.6.0
2023-09-06 10:42:24 +10:00
James Collins
f09bf02c10 Merge pull request #227 from STEMMechanics/dependabot/composer/laravel/sanctum-3.3.0
Bump laravel/sanctum from 3.2.6 to 3.3.0
2023-09-06 10:42:07 +10:00
James Collins
ee2c30f938 Merge pull request #220 from STEMMechanics/dependabot/npm_and_yarn/prettier-3.0.3
Bump prettier from 3.0.2 to 3.0.3
2023-09-06 10:41:41 +10:00
dependabot[bot]
82f28bc712 Bump laravel/pint from 1.12.0 to 1.13.0
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 00:28:51 +00:00
dependabot[bot]
8020baf9d1 Bump phpunit/phpunit from 10.3.2 to 10.3.3
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.3.2 to 10.3.3.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.3.3/ChangeLog-10.3.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.3.2...10.3.3)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 00:28:46 +00:00
dependabot[bot]
b1cac44432 Bump @tiptap/extension-superscript from 2.1.7 to 2.1.8
Bumps [@tiptap/extension-superscript](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-superscript) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v2.1.8/packages/extension-superscript/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v2.1.8/packages/extension-superscript)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-superscript"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 00:37:11 +00:00
dependabot[bot]
ab46b6118d Bump @tiptap/extension-highlight from 2.1.7 to 2.1.8
Bumps [@tiptap/extension-highlight](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-highlight) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v2.1.8/packages/extension-highlight/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v2.1.8/packages/extension-highlight)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-highlight"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 00:36:45 +00:00
dependabot[bot]
52a1bfe804 Bump @typescript-eslint/eslint-plugin from 6.5.0 to 6.6.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.6.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 00:36:20 +00:00
dependabot[bot]
c7c5b5298c Bump laravel/sanctum from 3.2.6 to 3.3.0
Bumps [laravel/sanctum](https://github.com/laravel/sanctum) from 3.2.6 to 3.3.0.
- [Release notes](https://github.com/laravel/sanctum/releases)
- [Changelog](https://github.com/laravel/sanctum/blob/3.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sanctum/compare/v3.2.6...v3.3.0)

---
updated-dependencies:
- dependency-name: laravel/sanctum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 00:17:28 +00:00
James Collins
4c07917542 Merge pull request #225 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.55.6
Bump unocss from 0.55.4 to 0.55.6
2023-09-04 11:11:03 +10:00
dependabot[bot]
fe06a2dd55 Bump unocss from 0.55.4 to 0.55.6
Bumps [unocss](https://github.com/unocss/unocss) from 0.55.4 to 0.55.6.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.55.4...v0.55.6)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 01:03:15 +00:00
143f002ead allow blank 2023-09-02 21:09:36 +10:00
83c0ae5841 bug fixes 2023-09-02 21:01:19 +10:00
0c05386804 bug fixes 2023-09-02 20:44:56 +10:00
9a70d4de0d bugfix 2023-09-02 19:59:26 +10:00
8950b5f50b titlecase to fix CDN 2023-09-02 19:56:06 +10:00
59e077fd6a bug fixes 2023-09-02 19:55:55 +10:00
c9fc5b2157 bugfix 2023-09-02 19:40:38 +10:00
e128bcfaf9 bugfix 2023-09-02 19:36:55 +10:00
7cf6b0bba6 bug fixes 2023-09-02 19:30:45 +10:00
c36d4783e7 dependency updates 2023-09-02 19:02:19 +10:00
29acd76051 fixes 2023-09-02 18:58:13 +10:00
eacf33b642 updates 2023-09-01 16:51:46 +10:00
46666db231 prevent truncation of urls 2023-09-01 13:00:07 +10:00
3dfa753f33 fix path truncates 2023-09-01 12:58:20 +10:00
41ae64a8c9 new media job support 2023-09-01 12:22:25 +10:00
fcf5400f71 added 2023-09-01 08:43:57 +10:00
2257736ad9 bug fixes 2023-08-31 23:21:20 +10:00
147b55ae78 updates 2023-08-30 15:20:24 +10:00
5b6c951dc0 use new mediaJob 2023-08-30 14:22:27 +10:00
0840d65011 added respondServerError 2023-08-30 12:00:44 +10:00
6394234960 more rules 2023-08-30 11:08:24 +10:00
e1dde655cb rename class 2023-08-30 10:55:36 +10:00
e01d59cbd8 use mediajob 2023-08-30 10:54:44 +10:00
22d1e195ed change id to job_id 2023-08-30 10:54:44 +10:00
c776e7b102 media job model 2023-08-30 10:52:26 +10:00
dependabot[bot]
3cd95a5a6b Bump prettier from 3.0.2 to 3.0.3
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 00:35:52 +00:00
aba7845a4b changes 2023-08-30 08:19:23 +10:00
f23c4c42b5 added location_url rule 2023-08-30 06:54:27 +10:00
05149dc723 update full description 2023-08-29 18:14:48 +10:00
a615c9d1d8 added full status 2023-08-29 18:11:29 +10:00
eed9ac8ff4 bugfix 2023-08-29 15:51:55 +10:00
258e7fe307 bugfix 2023-08-29 15:47:58 +10:00
a49a86a597 debug 2023-08-29 15:43:21 +10:00
b01c5d57c7 debug 2023-08-29 15:38:37 +10:00
4b0c113941 bug fix 2023-08-29 15:32:18 +10:00
277a0ae2e3 debug 2023-08-29 15:29:43 +10:00
a61aafdc6a debug 2023-08-29 15:25:31 +10:00
3a2899f913 debug 2023-08-29 15:22:27 +10:00
05b172cd47 bug fix 2023-08-29 15:07:40 +10:00
351259909c fix rule validation 2023-08-29 15:02:33 +10:00
0af44ffe02 bug fix 2023-08-29 14:56:02 +10:00
06799a90b0 bug fixes 2023-08-29 14:54:40 +10:00
c7fc9a1480 support chunk uploading 2023-08-29 14:51:30 +10:00
d5b8a89776 support file upload chunking 2023-08-29 14:34:59 +10:00
eada83aaf8 added chunking rules 2023-08-29 14:34:51 +10:00
9a63a9de80 additional helpers 2023-08-29 14:34:42 +10:00
b4859fd97f cleanup 2023-08-29 11:56:05 +10:00
794a18cfa0 updates to media handling on frontend 2023-08-29 11:31:57 +10:00
581b732b05 layout fixes 2023-08-29 08:44:56 +10:00
0119875d22 cache persistant 2023-08-29 08:03:06 +10:00
0f34c7dfb9 use new caching 2023-08-28 23:16:12 +10:00
04be7fdb3c implement callback/caching 2023-08-28 23:16:04 +10:00
123d45d172 removed debug log 2023-08-28 23:02:04 +10:00
James Collins
864ae189af Merge pull request #213 from STEMMechanics/dependabot/npm_and_yarn/vitest-0.34.3
Bump vitest from 0.33.0 to 0.34.3
2023-08-28 22:19:43 +10:00
dependabot[bot]
13b2620d2e Bump vitest from 0.33.0 to 0.34.3
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.33.0 to 0.34.3.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.34.3/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 12:19:18 +00:00
James Collins
75c4ad73ed Merge pull request #198 from STEMMechanics/dependabot/npm_and_yarn/prettier-3.0.2
Bump prettier from 3.0.0 to 3.0.2
2023-08-28 22:18:45 +10:00
James Collins
2c2f5621df Merge pull request #212 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.55.3
Bump unocss from 0.54.3 to 0.55.3
2023-08-28 22:18:31 +10:00
James Collins
855accab4f Merge pull request #199 from STEMMechanics/dependabot/composer/square/square-30.0.0.20230816
Bump square/square from 29.0.0.20230720 to 30.0.0.20230816
2023-08-28 22:17:38 +10:00
dependabot[bot]
afaa702a02 Bump prettier from 3.0.0 to 3.0.2
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.0...3.0.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 12:17:32 +00:00
James Collins
15637d398e Merge pull request #197 from STEMMechanics/dependabot/npm_and_yarn/laravel-vite-plugin-0.8.0
Bump laravel-vite-plugin from 0.7.8 to 0.8.0
2023-08-28 22:17:07 +10:00
James Collins
f346625bb1 Merge pull request #188 from STEMMechanics/dependabot/npm_and_yarn/eslint-config-prettier-9.0.0
Bump eslint-config-prettier from 8.9.0 to 9.0.0
2023-08-28 22:16:36 +10:00
9764fef01c dependency updates 2023-08-28 22:13:56 +10:00
338d6c6f9d bug fix 2023-08-28 15:40:12 +10:00
9da6f39e6e bug fix 2023-08-28 15:37:45 +10:00
5759794f71 dont process video if not changed 2023-08-28 15:31:31 +10:00
ee9d96a5bf fix increment 2023-08-28 15:31:20 +10:00
9197a86670 fix progress bar 2023-08-28 15:21:10 +10:00
64e45b1892 fixes 2023-08-28 15:11:18 +10:00
6890a0939d fix rotate error 2023-08-28 14:29:47 +10:00
61c78534d8 loading status and fixes 2023-08-28 14:21:09 +10:00
5a611f96a8 added x-small 2023-08-28 14:21:00 +10:00
3e7f34d5c4 fix video uploads 2023-08-28 14:00:07 +10:00
dependabot[bot]
78d16bec5f Bump unocss from 0.54.3 to 0.55.3
Bumps [unocss](https://github.com/unocss/unocss) from 0.54.3 to 0.55.3.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.54.3...v0.55.3)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 01:13:24 +00:00
33f658e088 provide progress 2023-08-28 07:39:41 +10:00
0b46c34abe Probe video format 2023-08-27 07:08:31 +10:00
f1ad20cb0b Change hiding workshops from 14 to 8 days old 2023-08-27 06:50:30 +10:00
511da54909 dont force refresh alll files 2023-08-25 20:08:09 +10:00
104407646c fix missing filter 2023-08-25 19:48:36 +10:00
622229cfc9 fixes 2023-08-25 11:30:57 +10:00
f50e6ad209 dependency updates 2023-08-24 22:17:44 +10:00
d7529cef80 updated to media management 2023-08-24 22:14:43 +10:00
dependabot[bot]
f7432158e1 Bump square/square from 29.0.0.20230720 to 30.0.0.20230816
Bumps [square/square](https://github.com/square/square-php-sdk) from 29.0.0.20230720 to 30.0.0.20230816.
- [Release notes](https://github.com/square/square-php-sdk/releases)
- [Changelog](https://github.com/square/square-php-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/square-php-sdk/compare/29.0.0.20230720...30.0.0.20230816)

---
updated-dependencies:
- dependency-name: square/square
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 00:34:01 +00:00
dependabot[bot]
2df6597771 Bump laravel-vite-plugin from 0.7.8 to 0.8.0
Bumps [laravel-vite-plugin](https://github.com/laravel/vite-plugin) from 0.7.8 to 0.8.0.
- [Release notes](https://github.com/laravel/vite-plugin/releases)
- [Changelog](https://github.com/laravel/vite-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/vite-plugin/compare/v0.7.8...v0.8.0)

---
updated-dependencies:
- dependency-name: laravel-vite-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 00:44:20 +00:00
60a15c2227 cleanup slug formatting 2023-08-14 10:06:08 +10:00
a369db9ca1 move css out of app.blade.php 2023-08-14 10:02:01 +10:00
dependabot[bot]
ac35d61ae2 Bump eslint-config-prettier from 8.9.0 to 9.0.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.9.0 to 9.0.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.9.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-13 10:22:44 +00:00
489668a2ff dependency updates 2023-08-13 20:21:52 +10:00
c9087d5df4 cleanup 2023-08-13 19:39:56 +10:00
ac06b3700c cleanup 2023-08-13 19:37:47 +10:00
31578f5ed3 cleanup 2023-08-13 18:58:52 +10:00
9b178ade4b use generateVariants in model 2023-08-13 07:58:19 +10:00
92522b5494 added generateVariants 2023-08-13 07:57:20 +10:00
ccebb4eb73 dont distort thumbnail 2023-08-13 07:39:36 +10:00
16873e7477 move generateThumbnail to model 2023-08-13 07:36:34 +10:00
79318e2f28 cleanup 2023-08-13 07:09:55 +10:00
f44a4f5d9d resize pagination 2023-08-13 07:05:29 +10:00
b28925079b add margin to pagination bottom 2023-08-13 07:05:22 +10:00
cbf6803812 Merge pull request #174 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.2.1 2023-08-01 12:27:01 +10:00
dependabot[bot]
a0e804aa62 Bump @typescript-eslint/parser from 6.2.0 to 6.2.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 02:26:18 +00:00
d1b87bd64b Merge pull request #175 from STEMMechanics/dependabot/npm_and_yarn/knip-2.17.2 2023-08-01 12:25:57 +10:00
5b783035a3 Merge pull request #173 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.54.1 2023-08-01 12:25:38 +10:00
a06363da75 Merge pull request #172 from STEMMechanics/dependabot/npm_and_yarn/sass-1.64.2 2023-08-01 12:25:11 +10:00
a68c691f75 Merge pull request #171 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.2.1 2023-08-01 12:24:53 +10:00
dependabot[bot]
8a61d258fb Bump knip from 2.17.1 to 2.17.2
Bumps [knip](https://github.com/webpro/knip) from 2.17.1 to 2.17.2.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.17.1...2.17.2)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 00:27:18 +00:00
dependabot[bot]
fd3f220752 Bump unocss from 0.54.0 to 0.54.1
Bumps [unocss](https://github.com/unocss/unocss) from 0.54.0 to 0.54.1.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.54.0...v0.54.1)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 00:25:37 +00:00
dependabot[bot]
0a0b2927ae Bump sass from 1.64.1 to 1.64.2
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.1 to 1.64.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.1...1.64.2)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 00:25:03 +00:00
dependabot[bot]
4c19773818 Bump @typescript-eslint/eslint-plugin from 6.2.0 to 6.2.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 00:24:46 +00:00
James Collins
071af03577 Merge pull request #170 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-vue-9.16.1
Bump eslint-plugin-vue from 9.16.0 to 9.16.1
2023-07-31 11:06:23 +10:00
James Collins
58da0b54b3 Merge pull request #169 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.54.0
Bump unocss from 0.53.6 to 0.54.0
2023-07-31 11:06:10 +10:00
dependabot[bot]
528ea4bcfb Bump eslint-plugin-vue from 9.16.0 to 9.16.1
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.16.0 to 9.16.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.16.0...v9.16.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 01:05:16 +00:00
dependabot[bot]
ca124d34cd Bump unocss from 0.53.6 to 0.54.0
Bumps [unocss](https://github.com/unocss/unocss) from 0.53.6 to 0.54.0.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.53.6...v0.54.0)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 01:04:51 +00:00
70b53ce21a clean up attributes 2023-07-31 10:05:13 +10:00
6dc226ab0b do not send email on unit testing 2023-07-31 10:05:04 +10:00
d6524942f7 fix permissions vs permissions() 2023-07-31 09:33:23 +10:00
3ca5e81e34 dependency updates 2023-07-30 07:20:19 +10:00
561b5ad1b9 install clockwork for dev 2023-07-30 07:15:01 +10:00
229bb9a5e0 fix arrays 2023-07-30 07:15:01 +10:00
280d3e9043 Update HasAttachments.php 2023-07-30 07:03:16 +10:00
a2384f4b35 caching 2023-07-29 23:04:14 +10:00
d65bf5bcd5 mobile fix 2023-07-28 15:37:04 +10:00
e763a9140c fix search bar on mobile 2023-07-28 14:59:22 +10:00
3a06a375ef fix on mobiles 2023-07-28 14:56:20 +10:00
bdf3f38190 improve table on mobile 2023-07-28 14:06:34 +10:00
5b2f6e44b1 fix label padding 2023-07-28 14:06:27 +10:00
250401fd62 show image loader/errors 2023-07-28 13:46:40 +10:00
c1fb03add1 Merge pull request #168 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.4.5 2023-07-28 10:25:08 +10:00
dependabot[bot]
56bf7efcef Bump eslint-plugin-jsdoc from 46.4.4 to 46.4.5
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.4.4 to 46.4.5.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.4.4...v46.4.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 00:24:19 +00:00
cc0508683e Merge pull request #167 from STEMMechanics/dependabot/npm_and_yarn/eslint-config-prettier-8.9.0 2023-07-28 10:23:36 +10:00
dependabot[bot]
b232b65860 Bump eslint-config-prettier from 8.8.0 to 8.9.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.8.0 to 8.9.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.8.0...v8.9.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 00:19:25 +00:00
406d1d31c0 fix typedefs 2023-07-28 09:42:03 +10:00
f8fe5c92aa cleanup 2023-07-28 09:29:05 +10:00
69623bd248 add variant support for thumbnails 2023-07-28 09:28:54 +10:00
6d4995074b attachments do not have users 2023-07-28 08:40:39 +10:00
ac94068864 cleanuip 2023-07-28 08:38:41 +10:00
31ed355d64 cleanup 2023-07-28 08:17:33 +10:00
8a54fb272a remove old code 2023-07-27 22:23:05 +10:00
6ecf807081 update method name 2023-07-27 22:22:46 +10:00
728472b897 expose 2023-07-27 22:21:01 +10:00
30a8c8a03a wait until mounted 2023-07-27 22:13:47 +10:00
00e7490037 test 2023-07-27 22:12:04 +10:00
1d152d730a fix form progress 2023-07-27 22:04:17 +10:00
a010d91da2 show error 2023-07-27 21:59:17 +10:00
3717248764 fixed flatten 2023-07-27 21:55:35 +10:00
27753e903b added exception handling 2023-07-27 20:58:38 +10:00
b621f71b54 remove mail logging 2023-07-27 20:43:16 +10:00
d4b3300b88 update config 2023-07-27 19:48:04 +10:00
242fb9dda0 added email logging 2023-07-27 19:47:09 +10:00
4f505cd155 fix BelongsTo association 2023-07-27 19:44:09 +10:00
dca70a0f53 fix bad mimetype requests 2023-07-27 19:37:45 +10:00
b9a8c826ec pass in accepts to show relevant files 2023-07-27 16:06:13 +10:00
363deb3ca7 fix showing error on empty 2023-07-27 15:50:55 +10:00
f77b5f7556 fix accepts 2023-07-27 15:50:46 +10:00
d60efe38e2 add uploads to selection list 2023-07-27 15:37:32 +10:00
f779342e02 fix z-index and add delete button 2023-07-27 15:29:35 +10:00
204e62b3bb fix z-index 2023-07-27 15:29:28 +10:00
5adc24f997 dont shrink 2023-07-27 15:09:58 +10:00
ab25b0f64a update selection details on change 2023-07-27 15:07:24 +10:00
dd8e59cd4f thumbnail support 2023-07-27 14:36:46 +10:00
0c4c36eb74 dependency updates 2023-07-27 06:28:43 +10:00
James Collins
3481f10033 Merge pull request #166 from STEMMechanics/dependabot/composer/laravel/framework-10.16.0
Bump laravel/framework from 10.15.0 to 10.16.0
2023-07-26 11:03:38 +10:00
James Collins
fdf61fef3d Merge pull request #165 from STEMMechanics/dependabot/npm_and_yarn/knip-2.17.0
Bump knip from 2.16.1 to 2.17.0
2023-07-26 11:03:22 +10:00
James Collins
30c3c5d33f Merge pull request #164 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-6.2.0
Bump @typescript-eslint/parser from 6.1.0 to 6.2.0
2023-07-26 11:03:09 +10:00
dependabot[bot]
6cd7df79d9 Bump @typescript-eslint/parser from 6.1.0 to 6.2.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 01:02:30 +00:00
James Collins
b5b0b5d7bd Merge pull request #162 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.2.0
Bump @typescript-eslint/eslint-plugin from 6.1.0 to 6.2.0
2023-07-26 11:01:53 +10:00
James Collins
d0266c7d0c Merge pull request #161 from STEMMechanics/dependabot/npm_and_yarn/vite-4.4.7
Bump vite from 4.4.6 to 4.4.7
2023-07-26 11:01:38 +10:00
dependabot[bot]
283fd30c19 Bump vite from 4.4.6 to 4.4.7
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.6 to 4.4.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 01:00:23 +00:00
James Collins
5d13135bd0 Merge pull request #160 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.53.6
Bump unocss from 0.53.5 to 0.53.6
2023-07-26 10:59:46 +10:00
dependabot[bot]
6c2961eef6 Bump laravel/framework from 10.15.0 to 10.16.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.15.0 to 10.16.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.15.0...v10.16.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 00:39:12 +00:00
dependabot[bot]
f9c006403e Bump knip from 2.16.1 to 2.17.0
Bumps [knip](https://github.com/webpro/knip) from 2.16.1 to 2.17.0.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.16.1...2.17.0)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 00:11:54 +00:00
dependabot[bot]
1f65f0fe30 Bump @typescript-eslint/eslint-plugin from 6.1.0 to 6.2.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 00:42:34 +00:00
dependabot[bot]
a49a287855 Bump unocss from 0.53.5 to 0.53.6
Bumps [unocss](https://github.com/unocss/unocss) from 0.53.5 to 0.53.6.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.53.5...v0.53.6)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 00:41:48 +00:00
bf7f830f9e fix formatted date 2023-07-24 20:25:27 +10:00
ffce564a47 fix info box icon shrinkage 2023-07-24 20:25:27 +10:00
2cdcd9a424 fix button types not displayed correctly 2023-07-24 20:25:27 +10:00
ffbc733571 fix undefined method 2023-07-24 15:02:13 +10:00
3ea7188253 updated logo 2023-07-24 13:05:57 +10:00
97c6a4c4ef cleanup 2023-07-24 12:51:34 +10:00
f3fe112427 fix params 2023-07-24 12:39:29 +10:00
189e4ef230 set null value to empty string 2023-07-24 12:36:34 +10:00
d35b895ff4 incorrect table name 2023-07-24 12:35:12 +10:00
c47c511674 fix bad call to gallery() 2023-07-24 12:32:55 +10:00
20be21c87d allow nullable useragent 2023-07-24 12:31:16 +10:00
1d57dc519f fix margin 2023-07-24 12:13:12 +10:00
644b42afe9 enable form on error 2023-07-24 12:12:15 +10:00
9ad11f24c2 update event controller to save attachments 2023-07-24 11:58:10 +10:00
1e2564f753 open links in new window 2023-07-24 11:52:58 +10:00
f1ab544aae fix attachments editor not shown 2023-07-24 11:50:04 +10:00
James Collins
aa85d24952 Merge pull request #159 from STEMMechanics/dependabot/npm_and_yarn/pinia-plugin-persistedstate-3.2.0
Bump pinia-plugin-persistedstate from 3.1.0 to 3.2.0
2023-07-24 11:48:41 +10:00
dependabot[bot]
b0f8817aae Bump pinia-plugin-persistedstate from 3.1.0 to 3.2.0
Bumps [pinia-plugin-persistedstate](https://github.com/prazdevs/pinia-plugin-persistedstate) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/prazdevs/pinia-plugin-persistedstate/releases)
- [Commits](https://github.com/prazdevs/pinia-plugin-persistedstate/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: pinia-plugin-persistedstate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 01:48:25 +00:00
James Collins
b9e3e9f5f2 Merge pull request #158 from STEMMechanics/dependabot/npm_and_yarn/knip-2.16.1
Bump knip from 2.16.0 to 2.16.1
2023-07-24 11:48:21 +10:00
dependabot[bot]
ea05f5992d Bump knip from 2.16.0 to 2.16.1
Bumps [knip](https://github.com/webpro/knip) from 2.16.0 to 2.16.1.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.16.0...2.16.1)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 01:48:14 +00:00
James Collins
9c138d6bee Merge pull request #157 from STEMMechanics/dependabot/npm_and_yarn/sass-1.64.1
Bump sass from 1.64.0 to 1.64.1
2023-07-24 11:47:44 +10:00
James Collins
7325880a70 Merge pull request #156 from STEMMechanics/dependabot/npm_and_yarn/postcss-8.4.27
Bump postcss from 8.4.26 to 8.4.27
2023-07-24 11:47:30 +10:00
James Collins
320631e91d Merge pull request #155 from STEMMechanics/dependabot/npm_and_yarn/vite-4.4.6
Bump vite from 4.4.5 to 4.4.6
2023-07-24 11:47:09 +10:00
James Collins
0997864cd6 Merge pull request #154 from STEMMechanics/dependabot/composer/doctrine/dbal-3.6.5
Bump doctrine/dbal from 3.6.4 to 3.6.5
2023-07-24 11:46:50 +10:00
James Collins
9e0451d541 Merge pull request #149 from STEMMechanics/dependabot/composer/square/square-29.0.0.20230720
Bump square/square from 28.0.1.20230608 to 29.0.0.20230720
2023-07-24 11:46:35 +10:00
dependabot[bot]
84245c5584 Bump sass from 1.64.0 to 1.64.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.0...1.64.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 00:56:49 +00:00
dependabot[bot]
d72c0ea9f5 Bump postcss from 8.4.26 to 8.4.27
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.26 to 8.4.27.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.26...8.4.27)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 00:56:24 +00:00
dependabot[bot]
bf9500f960 Bump vite from 4.4.5 to 4.4.6
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.5 to 4.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 00:56:11 +00:00
dependabot[bot]
f18cda6c00 Bump doctrine/dbal from 3.6.4 to 3.6.5
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 3.6.4 to 3.6.5.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/3.6.4...3.6.5)

---
updated-dependencies:
- dependency-name: doctrine/dbal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 00:48:53 +00:00
0ab20a75ac duplicates should be draft, fix hour column 2023-07-21 11:34:48 +10:00
133a6ed4ea added duplication support 2023-07-21 11:30:16 +10:00
bc424b7a00 update event to new attachments API 2023-07-21 11:25:35 +10:00
be3c6d89ee Fix #150 2023-07-21 11:18:08 +10:00
d814ed1972 use transparent background instead of white 2023-07-21 11:10:07 +10:00
8322229001 dependency updates 2023-07-21 10:54:45 +10:00
da2a76d6cf only show current events if date is empty 2023-07-21 10:52:16 +10:00
dependabot[bot]
abf7a2783c Bump square/square from 28.0.1.20230608 to 29.0.0.20230720
Bumps [square/square](https://github.com/square/square-php-sdk) from 28.0.1.20230608 to 29.0.0.20230720.
- [Release notes](https://github.com/square/square-php-sdk/releases)
- [Changelog](https://github.com/square/square-php-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/square-php-sdk/compare/28.0.1.20230608...29.0.0.20230720)

---
updated-dependencies:
- dependency-name: square/square
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 00:36:30 +00:00
6690c69efe fix sqlite error 2023-07-19 17:04:40 +10:00
67044b7cf9 use variant thumb 2023-07-19 15:53:58 +10:00
048d3af39b dont show duplicates 2023-07-19 15:35:10 +10:00
816989d472 display initial items in editor 2023-07-19 15:31:16 +10:00
8f6310b463 added delete item button 2023-07-19 15:19:35 +10:00
3cebdd838b fix typecasting 2023-07-19 15:05:56 +10:00
9996404e29 missing trait 2023-07-19 15:00:07 +10:00
1598efac35 updated attachments 2023-07-19 14:56:56 +10:00
bfacb86f35 allow uploads 2023-07-19 12:48:17 +10:00
James Collins
e5e5c7e19c Merge pull request #145 from STEMMechanics/dependabot/composer/mockery/mockery-1.6.3
Bump mockery/mockery from 1.6.2 to 1.6.3
2023-07-19 12:12:55 +10:00
dependabot[bot]
9ede1d7eea Bump mockery/mockery from 1.6.2 to 1.6.3
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.6.2...1.6.3)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 00:19:04 +00:00
ff8cf83f1b fix test 2023-07-18 19:36:17 +10:00
326c8e7b81 migrate configuration 2023-07-18 19:34:03 +10:00
daeecfbd4f allow image upload 2023-07-18 19:16:59 +10:00
15c330c784 dependency updates 2023-07-18 18:44:27 +10:00
7ba80ccc58 fixes 2023-07-18 18:41:17 +10:00
ef4efe723f gallery support 2023-07-18 18:37:49 +10:00
64ef8e9acd removed gallery item 2023-07-18 18:36:12 +10:00
d88b6f6e95 changed attachment to addendum 2023-07-18 18:36:12 +10:00
440d66322c add drop column 2023-07-18 18:36:12 +10:00
James Collins
469a646ae3 changed layout for consistency 2023-07-15 21:56:56 +10:00
9cb9ebbe4f fix robots seo to not follow/index authenticated pages 2023-07-14 14:12:27 +10:00
James Collins
d004855dd8 Merge pull request #132 from STEMMechanics/dependabot/npm_and_yarn/postcss-8.4.26
Bump postcss from 8.4.25 to 8.4.26
2023-07-14 11:16:10 +10:00
dependabot[bot]
911645c9f5 Bump postcss from 8.4.25 to 8.4.26
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.25 to 8.4.26.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.25...8.4.26)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 01:13:15 +00:00
James Collins
6a16e78d80 Merge pull request #133 from STEMMechanics/dependabot/npm_and_yarn/knip-2.15.5
Bump knip from 2.15.2 to 2.15.5
2023-07-14 11:12:32 +10:00
937c5024cb add support to convert HEIC files 2023-07-14 11:09:46 +10:00
dependabot[bot]
7e12ba1a00 Bump knip from 2.15.2 to 2.15.5
Bumps [knip](https://github.com/webpro/knip) from 2.15.2 to 2.15.5.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.15.2...2.15.5)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 00:16:15 +00:00
89d57bb915 better handling of selection list 2023-07-14 08:57:02 +10:00
a111387a3f fix date in banner not using UTC 2023-07-13 20:10:06 +10:00
234fcb13af fix lists in html 2023-07-13 13:11:15 +10:00
377fdad6e0 allow uploading of images 2023-07-13 13:00:12 +10:00
68020b0201 fix small block 2023-07-13 11:46:43 +10:00
f0628c5c05 fix small block 2023-07-13 11:28:00 +10:00
66d2a2c48c fix display small 2023-07-13 11:25:52 +10:00
6f1229418e added small option 2023-07-13 11:19:56 +10:00
a430fee568 fix page padding 2023-07-13 08:28:08 +10:00
53b7ce651e updated minecraft information 2023-07-13 07:34:17 +10:00
1028064abe fix link underline 2023-07-12 22:54:22 +10:00
ab285870e3 package fixes 2023-07-12 22:41:12 +10:00
1a02d46151 add support for multiple selections 2023-07-12 22:30:44 +10:00
1bb70bbe66 fix bubble menu 2023-07-12 22:30:37 +10:00
c158155194 fix setValidationResult 2023-07-12 22:30:12 +10:00
7bfd4c1198 added mimeMatches 2023-07-12 22:29:51 +10:00
ea959d1a10 fix alignment on small screens 2023-07-12 22:29:43 +10:00
9fc5d81877 fix toolbar on mobile 2023-07-12 13:43:24 +10:00
719aac6727 fix shorthand time parsing 2023-07-12 13:29:19 +10:00
c8398920c5 bubble updates 2023-07-12 12:52:48 +10:00
James Collins
55bd914b8f Merge pull request #126 from STEMMechanics/dependabot/npm_and_yarn/vite-4.4.3
Bump vite from 4.4.2 to 4.4.3
2023-07-12 11:29:42 +10:00
dependabot[bot]
2b06a52705 Bump vite from 4.4.2 to 4.4.3
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 01:27:06 +00:00
James Collins
2c9c997d5a Merge pull request #119 from STEMMechanics/dependabot/npm_and_yarn/vite-plugin-compression2-0.10.2
Bump vite-plugin-compression2 from 0.9.3 to 0.10.2
2023-07-12 11:26:29 +10:00
James Collins
17f305d9cb Merge pull request #128 from STEMMechanics/dependabot/composer/laravel/sail-1.23.1
Bump laravel/sail from 1.23.0 to 1.23.1
2023-07-12 11:26:13 +10:00
James Collins
44d071696f Merge pull request #127 from STEMMechanics/dependabot/npm_and_yarn/knip-2.15.2
Bump knip from 2.15.1 to 2.15.2
2023-07-12 11:25:55 +10:00
dependabot[bot]
fa8f44135c Bump vite-plugin-compression2 from 0.9.3 to 0.10.2
Bumps [vite-plugin-compression2](https://github.com/nonzzz/vite-compression-plugin) from 0.9.3 to 0.10.2.
- [Release notes](https://github.com/nonzzz/vite-compression-plugin/releases)
- [Changelog](https://github.com/nonzzz/vite-plugin-compression/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nonzzz/vite-compression-plugin/compare/v0.9.3...v0.10.2)

---
updated-dependencies:
- dependency-name: vite-plugin-compression2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 01:25:52 +00:00
dependabot[bot]
b38e79ef8f Bump laravel/sail from 1.23.0 to 1.23.1
Bumps [laravel/sail](https://github.com/laravel/sail) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/laravel/sail/releases)
- [Changelog](https://github.com/laravel/sail/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sail/compare/v1.23.0...v1.23.1)

---
updated-dependencies:
- dependency-name: laravel/sail
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 01:25:41 +00:00
James Collins
e2e39fbdf5 Merge pull request #123 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.0.0
Bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0
2023-07-12 11:25:35 +10:00
James Collins
a8262932cc Merge pull request #117 from STEMMechanics/dependabot/npm_and_yarn/vitest-0.33.0
Bump vitest from 0.32.4 to 0.33.0
2023-07-12 11:24:55 +10:00
James Collins
6d3e9b3c1d Merge pull request #129 from STEMMechanics/dependabot/composer/laravel/framework-10.15.0
Bump laravel/framework from 10.14.1 to 10.15.0
2023-07-12 11:24:41 +10:00
James Collins
b91619801d Merge pull request #130 from STEMMechanics/dependabot/composer/laravel/pint-1.10.4
Bump laravel/pint from 1.10.3 to 1.10.4
2023-07-12 11:24:26 +10:00
dependabot[bot]
f1e32096f3 Bump laravel/pint from 1.10.3 to 1.10.4
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.10.3...v1.10.4)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 00:48:53 +00:00
dependabot[bot]
f5a327e72c Bump laravel/framework from 10.14.1 to 10.15.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.14.1 to 10.15.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.14.1...v10.15.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 00:48:49 +00:00
4fe05e39f7 updates 2023-07-12 10:21:45 +10:00
dependabot[bot]
c3779bf371 Bump knip from 2.15.1 to 2.15.2
Bumps [knip](https://github.com/webpro/knip) from 2.15.1 to 2.15.2.
- [Release notes](https://github.com/webpro/knip/releases)
- [Changelog](https://github.com/webpro/knip/blob/main/docs/release-notes-v2.md)
- [Commits](https://github.com/webpro/knip/compare/2.15.1...2.15.2)

---
updated-dependencies:
- dependency-name: knip
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 00:20:21 +00:00
54aa7e249e fix allowUploads permission 2023-07-12 09:11:04 +10:00
1744d192b5 fix error on url 2023-07-11 21:55:01 +10:00
3f7426c550 fix class 2023-07-11 21:52:29 +10:00
c4e017c7b7 fix content parsing 2023-07-11 21:50:49 +10:00
e723831548 added bubble menu 2023-07-11 21:50:33 +10:00
56b5dcd7d8 fix ignore allowUpload in file drop 2023-07-11 19:34:07 +10:00
dependabot[bot]
913d229630 Bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.61.0 to 6.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 09:32:05 +00:00
3dfb11d692 dependency updates 2023-07-11 19:31:09 +10:00
759ab14899 fix calculation 2023-07-11 19:29:08 +10:00
329ff7c478 fix incorrect key 2023-07-11 19:28:59 +10:00
a6022f7251 final media dialog 2023-07-11 19:22:18 +10:00
d345be889e work 2023-07-11 16:37:04 +10:00
2dbe9955d9 added info api 2023-07-11 10:36:57 +10:00
dependabot[bot]
8fcd33e0a1 Bump vitest from 0.32.4 to 0.33.0
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.32.4 to 0.33.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.33.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 06:05:41 +00:00
14aa5e3b28 additons 2023-07-10 16:05:00 +10:00
2cb9aac070 dependency updates 2023-07-10 08:38:08 +10:00
1c6a5c9d04 editor expansion 2023-07-07 22:54:34 +10:00
936aabf412 dependency updates 2023-07-07 18:37:06 +10:00
fa7478a5b5 remove bad dependency 2023-07-07 18:36:36 +10:00
8992554ba6 started toolbar 2023-07-07 16:40:23 +10:00
c8895137fa show loading icon 2023-07-07 11:31:43 +10:00
f8bc75f1f9 fix styling 2023-07-07 11:27:23 +10:00
43faa0f020 styling editor 2023-07-07 11:22:04 +10:00
8e76a18590 add loader option 2023-07-07 11:14:17 +10:00
9c1df26b4b remove obsolete css 2023-07-07 11:14:07 +10:00
6d89a499b1 pagination bar margin bottom 2023-07-07 09:54:32 +10:00
03430c272f reduce posts to 18 2023-07-07 09:52:04 +10:00
baf15296ce add toast loaders 2023-07-07 09:44:12 +10:00
56f74964ed removed mdpreview and added SMHTML 2023-07-07 07:21:14 +10:00
afad2df8f5 cleanup 2023-07-07 07:12:32 +10:00
d17ff1f2e7 dependency updates 2023-07-07 07:12:25 +10:00
4d9be34b4e changed to TipTap 2023-07-06 13:53:24 +10:00
James Collins
5213b28c2e Merge pull request #116 from STEMMechanics/dependabot/npm_and_yarn/prettier-3.0.0
Bump prettier from 2.8.8 to 3.0.0
2023-07-06 10:34:05 +10:00
dependabot[bot]
e0df5a53dc Bump prettier from 2.8.8 to 3.0.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 00:30:28 +00:00
James Collins
f13022ee1d update dependencies 2023-07-06 00:08:39 +00:00
James Collins
c063badb38 install tiptap dep 2023-07-06 00:06:35 +00:00
James Collins
693cf4cd2a remove md-editor 2023-07-06 00:05:15 +00:00
cc70b1a67f update dependencies 2023-07-04 09:28:41 +10:00
08d3366fe1 remove display name 2023-07-04 09:25:53 +10:00
080b2fcfc4 fixed bad link 2023-07-02 10:17:25 +10:00
5b1d02e3c1 reload value when late change 2023-07-01 19:36:55 +10:00
b322a405c7 fix form 2023-07-01 19:32:22 +10:00
0ed05b103b added 2023-07-01 19:32:15 +10:00
5431da3930 fix offset 2023-06-23 19:09:41 +10:00
2a6e5b7992 fix md-editor css crossover 2023-06-23 19:07:56 +10:00
85af95a8a0 dont wrap action column 2023-06-23 18:55:00 +10:00
e0b04a57ae fix starts at column not showing correct relative date 2023-06-23 18:53:57 +10:00
0533cd24fe fix relative dates in the future 2023-06-23 18:53:44 +10:00
9598031dd1 replace copy icon 2023-06-23 18:32:51 +10:00
9f808717d2 fix page padding 2023-06-23 18:30:32 +10:00
b4aa71b81b fix margin pagination 2023-06-23 12:07:55 +10:00
James Collins
321a8f0946 Merge pull request #98 from STEMMechanics/dependabot/npm_and_yarn/sass-1.63.6
Bump sass from 1.63.1 to 1.63.6
2023-06-23 11:32:38 +10:00
James Collins
93124cdad0 Merge pull request #99 from STEMMechanics/dependabot/npm_and_yarn/unocss-0.53.3
Bump unocss from 0.53.1 to 0.53.3
2023-06-23 11:32:17 +10:00
dependabot[bot]
26eae9b1cf Bump unocss from 0.53.1 to 0.53.3
Bumps [unocss](https://github.com/unocss/unocss) from 0.53.1 to 0.53.3.
- [Release notes](https://github.com/unocss/unocss/releases)
- [Commits](https://github.com/unocss/unocss/compare/v0.53.1...v0.53.3)

---
updated-dependencies:
- dependency-name: unocss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 01:09:48 +00:00
f803bc0a59 fix editor passing changes 2023-06-23 10:50:12 +10:00
be5925f40d margin below pagination 2023-06-23 10:20:50 +10:00
b25b697e7b disable payments 2023-06-23 10:12:13 +10:00
66e2a68cde added open_at for events 2023-06-23 09:54:52 +10:00
673f6051c1 disable cart icon 2023-06-23 09:48:09 +10:00
0478ab9eb2 fix incorrect select image control 2023-06-23 09:43:09 +10:00
b7fde520be add type=button to button elements 2023-06-23 08:44:44 +10:00
6f031f78e8 remove component 2023-06-23 08:40:45 +10:00
2f850ce152 remove last SMButton 2023-06-23 08:40:18 +10:00
dependabot[bot]
a6240a3ca9 Bump sass from 1.63.1 to 1.63.6
Bumps [sass](https://github.com/sass/dart-sass) from 1.63.1 to 1.63.6.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.63.1...1.63.6)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 21:57:27 +00:00
8906936e51 updates 2023-06-23 07:56:45 +10:00
fd6867740e fix preload 2023-06-22 21:46:13 +10:00
183231206b add loader 2023-06-22 17:42:04 +10:00
d4e832b526 show loader 2023-06-22 17:28:16 +10:00
667ff5cf94 rewrite 2023-06-22 17:16:22 +10:00
6d2db21a62 added api error callback with toast display 2023-06-12 13:13:38 +10:00
df398faddb fix permission check 2023-06-12 11:45:41 +10:00
e07e2d2e2c check item exists in object 2023-06-12 11:45:33 +10:00
ca29189f9e fix formatting 2023-06-12 11:45:20 +10:00
James Collins
15a1a3f666 Merge pull request #82 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.2.6
Bump eslint-plugin-jsdoc from 46.2.4 to 46.2.6
2023-06-08 11:21:11 +10:00
James Collins
8c4c09bc90 Merge pull request #81 from STEMMechanics/dependabot/npm_and_yarn/sass-1.63.1
Bump sass from 1.62.1 to 1.63.1
2023-06-08 11:20:58 +10:00
James Collins
5a926d2d41 Merge pull request #79 from STEMMechanics/dependabot/composer/laravel/pint-1.10.1
Bump laravel/pint from 1.10.0 to 1.10.1
2023-06-08 11:20:42 +10:00
James Collins
5127d8b283 Merge pull request #77 from STEMMechanics/dependabot/npm_and_yarn/vitest-0.32.0
Bump vitest from 0.31.4 to 0.32.0
2023-06-08 11:20:28 +10:00
dependabot[bot]
c043a43fc5 Bump eslint-plugin-jsdoc from 46.2.4 to 46.2.6
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.2.4 to 46.2.6.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.2.4...v46.2.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 01:18:52 +00:00
dependabot[bot]
013930d7c3 Bump sass from 1.62.1 to 1.63.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.62.1 to 1.63.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.62.1...1.63.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 01:18:20 +00:00
James Collins
6b0d66be25 Merge pull request #80 from STEMMechanics/dependabot/composer/mockery/mockery-1.6.2
Bump mockery/mockery from 1.6.1 to 1.6.2
2023-06-08 11:11:58 +10:00
dependabot[bot]
3b492d2005 Bump mockery/mockery from 1.6.1 to 1.6.2
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 01:08:18 +00:00
dependabot[bot]
29f4bfd3cc Bump laravel/pint from 1.10.0 to 1.10.1
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/laravel/pint/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 01:10:20 +00:00
dependabot[bot]
86e42c36cb Bump vitest from 0.31.4 to 0.32.0
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.31.4 to 0.32.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.32.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 01:08:47 +00:00
James Collins
c1d81c65d2 Merge pull request #74 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.59.9
Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.59.9
2023-06-06 11:08:00 +10:00
dependabot[bot]
fd864b03d9 Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.59.9
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.8 to 5.59.9.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.9/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 01:07:42 +00:00
James Collins
97eb51a434 Merge pull request #73 from STEMMechanics/dependabot/composer/mockery/mockery-1.6.1
Bump mockery/mockery from 1.6.0 to 1.6.1
2023-06-06 11:07:29 +10:00
James Collins
76f9b96369 Merge pull request #72 from STEMMechanics/dependabot/composer/laravel/framework-10.13.2
Bump laravel/framework from 10.13.1 to 10.13.2
2023-06-06 11:07:16 +10:00
James Collins
13e5cf2133 Merge pull request #75 from STEMMechanics/dependabot/npm_and_yarn/vite-plugin-compression2-0.9.2
Bump vite-plugin-compression2 from 0.9.1 to 0.9.2
2023-06-06 11:07:00 +10:00
James Collins
1c92f6449e Merge pull request #76 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-5.59.9
Bump @typescript-eslint/parser from 5.59.8 to 5.59.9
2023-06-06 11:06:46 +10:00
dependabot[bot]
3ed6cc8d5c Bump @typescript-eslint/parser from 5.59.8 to 5.59.9
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.8 to 5.59.9.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.9/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 01:06:17 +00:00
dependabot[bot]
5b79e415e0 Bump vite-plugin-compression2 from 0.9.1 to 0.9.2
Bumps [vite-plugin-compression2](https://github.com/nonzzz/vite-compression-plugin) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/nonzzz/vite-compression-plugin/releases)
- [Changelog](https://github.com/nonzzz/vite-plugin-compression/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nonzzz/vite-compression-plugin/compare/v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: vite-plugin-compression2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 01:06:02 +00:00
dependabot[bot]
98036c7266 Bump mockery/mockery from 1.6.0 to 1.6.1
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/1.6.1/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 01:05:46 +00:00
dependabot[bot]
8c8c59d8bd Bump laravel/framework from 10.13.1 to 10.13.2
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.13.1 to 10.13.2.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.13.1...v10.13.2)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 01:05:36 +00:00
fdbadbac7f added convertFileNameToTitle 2023-06-06 10:47:21 +10:00
9d788f919a show draft banner correctly 2023-06-05 20:15:45 +10:00
fac00bc4f6 support tbc, tbd 2023-06-05 19:55:47 +10:00
6e511fc4a9 support TBC/TBD 2023-06-05 19:53:11 +10:00
2f6214c48d convert dates from utc before parsing 2023-06-05 19:46:50 +10:00
b2f791fc5f remove debug 2023-06-05 19:09:51 +10:00
39140611ca fix combined filters and empty values 2023-06-05 19:09:36 +10:00
567ee3062b cleanup 2023-06-05 18:55:30 +10:00
584e0903c8 log exception and continue 2023-06-05 18:55:20 +10:00
8990006d4c remove s3 disk 2023-06-05 18:55:08 +10:00
7feb78ba70 dependency updates 2023-06-05 18:25:09 +10:00
d67ca133eb fix incorrect JsonResponse 2023-06-05 15:48:47 +10:00
f95557aa3a updated 2023-06-05 15:28:30 +10:00
f539ab7294 dependency updates 2023-06-05 15:05:45 +10:00
James Collins
79284e2271 Merge pull request #71 from STEMMechanics/dependabot/npm_and_yarn/vue-loader-17.2.2
Bump vue-loader from 17.1.1 to 17.2.2
2023-06-05 12:11:34 +10:00
James Collins
e303b565fc Merge pull request #62 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/parser-5.59.8
Bump @typescript-eslint/parser from 5.59.7 to 5.59.8
2023-06-05 12:11:16 +10:00
dependabot[bot]
985e8a5cd6 Bump vue-loader from 17.1.1 to 17.2.2
Bumps [vue-loader](https://github.com/vuejs/vue-loader) from 17.1.1 to 17.2.2.
- [Release notes](https://github.com/vuejs/vue-loader/releases)
- [Changelog](https://github.com/vuejs/vue-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-loader/compare/v17.1.1...v17.2.2)

---
updated-dependencies:
- dependency-name: vue-loader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 02:09:12 +00:00
dependabot[bot]
541e1c4c2c Bump @typescript-eslint/parser from 5.59.7 to 5.59.8
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.7 to 5.59.8.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.8/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 02:04:46 +00:00
James Collins
10c1d500f3 Merge pull request #67 from STEMMechanics/dependabot/composer/laravel/framework-10.13.1
Bump laravel/framework from 10.12.0 to 10.13.1
2023-06-05 12:00:19 +10:00
James Collins
678f16788c Merge pull request #68 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.2.0
Bump phpunit/phpunit from 10.1.3 to 10.2.0
2023-06-05 12:00:02 +10:00
James Collins
8871a1b7ae Merge pull request #69 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.2.4
Bump eslint-plugin-jsdoc from 45.0.0 to 46.2.4
2023-06-05 11:59:40 +10:00
James Collins
05c2f28f25 Merge pull request #70 from STEMMechanics/dependabot/composer/doctrine/dbal-3.6.3
Bump doctrine/dbal from 3.6.2 to 3.6.3
2023-06-05 11:59:26 +10:00
James Collins
30179fe353 Merge pull request #61 from STEMMechanics/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.59.8
Bump @typescript-eslint/eslint-plugin from 5.59.7 to 5.59.8
2023-06-05 11:58:46 +10:00
James Collins
6846dd760d Merge pull request #59 from STEMMechanics/dependabot/npm_and_yarn/vue-router-4.2.2
Bump vue-router from 4.2.1 to 4.2.2
2023-06-05 11:58:33 +10:00
dependabot[bot]
408f285cf3 Bump doctrine/dbal from 3.6.2 to 3.6.3
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/3.6.2...3.6.3)

---
updated-dependencies:
- dependency-name: doctrine/dbal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 01:40:07 +00:00
dependabot[bot]
fa76fc0f78 Bump eslint-plugin-jsdoc from 45.0.0 to 46.2.4
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 45.0.0 to 46.2.4.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v45.0.0...v46.2.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 01:40:02 +00:00
dependabot[bot]
ade9cd6b05 Bump phpunit/phpunit from 10.1.3 to 10.2.0
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.1.3 to 10.2.0.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.2.0/ChangeLog-10.2.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.1.3...10.2.0)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 01:40:01 +00:00
dependabot[bot]
933d18b784 Bump laravel/framework from 10.12.0 to 10.13.1
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.12.0 to 10.13.1.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.12.0...v10.13.1)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 01:39:55 +00:00
48bae3b181 remove debug 2023-06-03 18:40:22 +10:00
78f6ed1ef6 allow : in filter values 2023-06-03 18:38:12 +10:00
6d503939a5 temp filter fix 2023-06-03 08:39:12 +10:00
3677f1c45b fix upcoming events filter 2023-06-02 20:44:42 +10:00
dependabot[bot]
a23ce4e0e6 Bump @typescript-eslint/eslint-plugin from 5.59.7 to 5.59.8
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.7 to 5.59.8.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.8/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-30 01:07:19 +00:00
dependabot[bot]
e7c43fa53a Bump vue-router from 4.2.1 to 4.2.2
Bumps [vue-router](https://github.com/vuejs/router) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/vuejs/router/releases)
- [Commits](https://github.com/vuejs/router/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-30 01:05:49 +00:00
James Collins
0de6735855 Merge pull request #58 from STEMMechanics/dependabot/npm_and_yarn/postcss-8.4.24
Bump postcss from 8.4.23 to 8.4.24
2023-05-29 12:20:49 +10:00
James Collins
aa274b1df4 Merge pull request #57 from STEMMechanics/dependabot/npm_and_yarn/eslint-plugin-jsdoc-45.0.0
Bump eslint-plugin-jsdoc from 44.2.7 to 45.0.0
2023-05-29 12:20:34 +10:00
dependabot[bot]
51261a4a5c Bump postcss from 8.4.23 to 8.4.24
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.24.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.23...8.4.24)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 01:44:28 +00:00
dependabot[bot]
9e92561502 Bump eslint-plugin-jsdoc from 44.2.7 to 45.0.0
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 44.2.7 to 45.0.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v44.2.7...v45.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 01:43:37 +00:00
2b28ebc014 dependency updates 2023-05-27 12:41:37 +10:00
196d9c358c Merge pull request #56 from STEMMechanics:dependabot/composer/spatie/laravel-ignition-2.1.3
Bump spatie/laravel-ignition from 2.1.2 to 2.1.3
2023-05-27 12:38:44 +10:00
dependabot[bot]
38d58d92b4 Bump spatie/laravel-ignition from 2.1.2 to 2.1.3
Bumps [spatie/laravel-ignition](https://github.com/spatie/laravel-ignition) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/spatie/laravel-ignition/releases)
- [Changelog](https://github.com/spatie/laravel-ignition/blob/main/CHANGELOG.md)
- [Commits](https://github.com/spatie/laravel-ignition/compare/2.1.2...2.1.3)

---
updated-dependencies:
- dependency-name: spatie/laravel-ignition
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-26 01:14:39 +00:00
e136c910b5 support analytics dashboard 2023-05-25 21:54:59 +10:00
d0c4f7eea2 allow updating ended_at 2023-05-25 21:54:46 +10:00
bf9b0f3973 update session ended_at on new requests 2023-05-25 21:54:37 +10:00
4534b46e97 added AA key for uppercase AM/PM 2023-05-25 21:27:36 +10:00
68affe4e4c update table field names 2023-05-25 20:04:53 +10:00
aa2671f167 reset server error on reload 2023-05-25 20:04:38 +10:00
2178b61602 updated analytics structure 2023-05-25 19:35:20 +10:00
6a6b8ed9b2 added rename macro to Request 2023-05-25 19:35:05 +10:00
784e8cf787 added unmangle request params 2023-05-25 19:34:40 +10:00
89a8b6926a update getVariantsAttribute return type 2023-05-25 12:21:23 +10:00
9c926d15c1 updated dependencies 2023-05-25 12:19:19 +10:00
James Collins
1b1144c628 Merge pull request #55 from STEMMechanics/dependabot/npm_and_yarn/vue-dompurify-html-4.1.4
Bump vue-dompurify-html from 3.1.2 to 4.1.4
2023-05-25 12:16:29 +10:00
James Collins
e9b1802af3 Merge pull request #54 from STEMMechanics/dependabot/npm_and_yarn/vuepic/vue-datepicker-5.1.2
Bump @vuepic/vue-datepicker from 3.6.8 to 5.1.2
2023-05-25 12:16:16 +10:00
James Collins
fe7c1d93ae Merge pull request #53 from STEMMechanics/dependabot/npm_and_yarn/vitest-0.31.1
Bump vitest from 0.28.5 to 0.31.1
2023-05-25 12:09:09 +10:00
James Collins
8d1be827a7 Merge pull request #52 from STEMMechanics/dependabot/npm_and_yarn/typescript-5.0.4
Bump typescript from 4.9.5 to 5.0.4
2023-05-25 12:08:43 +10:00
dependabot[bot]
cd4fe13117 Bump vue-dompurify-html from 3.1.2 to 4.1.4
Bumps [vue-dompurify-html](https://github.com/LeSuisse/vue-dompurify-html/tree/HEAD/packages/vue-dompurify-html) from 3.1.2 to 4.1.4.
- [Release notes](https://github.com/LeSuisse/vue-dompurify-html/releases)
- [Commits](https://github.com/LeSuisse/vue-dompurify-html/commits/v4.1.4/packages/vue-dompurify-html)

---
updated-dependencies:
- dependency-name: vue-dompurify-html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 01:08:06 +00:00
dependabot[bot]
34e169adba Bump @vuepic/vue-datepicker from 3.6.8 to 5.1.2
Bumps [@vuepic/vue-datepicker](https://github.com/Vuepic/vue-datepicker) from 3.6.8 to 5.1.2.
- [Release notes](https://github.com/Vuepic/vue-datepicker/releases)
- [Commits](https://github.com/Vuepic/vue-datepicker/compare/v3.6.8...v5.1.2)

---
updated-dependencies:
- dependency-name: "@vuepic/vue-datepicker"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 01:07:58 +00:00
dependabot[bot]
d064756cc6 Bump vitest from 0.28.5 to 0.31.1
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.28.5 to 0.31.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.31.1/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 01:07:35 +00:00
dependabot[bot]
bf7e1658f4 Bump typescript from 4.9.5 to 5.0.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.5...v5.0.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 01:07:21 +00:00
8de3c5dcba added .phpunit.result.cache 2023-05-25 08:20:19 +10:00
e8827cbd50 fix hinting and tests for L10 and PHP8 2023-05-25 08:18:51 +10:00
f839003f5e dependency updates 2023-05-25 07:54:35 +10:00
b68d97455b remove gunk 2023-05-25 07:54:35 +10:00
James Collins
e9dcb8b3f0 Merge pull request #51 from STEMMechanics/shift-91888
PHPUnit 10 Shift
2023-05-25 07:53:54 +10:00
573 changed files with 18639 additions and 65834 deletions

View File

@@ -1,3 +0,0 @@
.github/
.vscode/
vendor/

View File

@@ -1,22 +0,0 @@
module.exports = {
env: {
node: true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-strongly-recommended",
"prettier",
"plugin:jsdoc/recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"vue/multi-word-component-names": "off",
indent: ["off", 4, { ignoredNodes: ["ConditionalExpression"] }],
"@typescript-eslint/no-inferrable-types": "off",
},
plugins: ["jsdoc", "@typescript-eslint"],
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
};

View File

@@ -3,40 +3,55 @@ name: Laravel
on:
push:
branches: ["main"]
pull_request:
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- uses: actions/checkout@v3
php-version: "8.4"
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
- name: Install PHP Dependencies
run: composer install -q --no-interaction --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Install Node dependencies
run: npm ci
- name: Build frontend
run: npm run build
- name: Run migrations
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan migrate --force
- name: Run PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "16.x"
- name: Install dependencies
run: npm ci
- name: Run Vue tests
env:
LARAVEL_BYPASS_ENV_CHECK: "1"
run: npm run test

View File

@@ -0,0 +1,24 @@
name: renovate
on:
workflow_dispatch:
schedule:
- cron: "@daily"
push:
branches:
- main
jobs:
renovate:
runs-on: ubuntu-latest
container: ghcr.io/renovatebot/renovate:43.2.3
steps:
- uses: actions/checkout@v4
- run: renovate
working-directory: ${{ gitea.workspace }}
env:
RENOVATE_CONFIG_FILE: "renovate-config.json"
LOG_LEVEL: "info"
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}

View File

@@ -1,15 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"

21
.gitignore vendored
View File

@@ -15,7 +15,7 @@ app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
public/hot*
# Laravel 5 & Lumen specific with changed public path
public_html/storage
@@ -237,11 +237,26 @@ dist/
### This Project ###
/public/uploads
/public/build
# /public/tinymce
*.key
### TinyMCE ###
/public/tinymce
!/public/tinymce/skins/ui/stemmech/
### Synk ###
.dccache
### TempCodeRunner ###
tempCodeRunnerFile.*
tempCodeRunnerFile.*
### PHPUnit ###
.phpunit.result.cache
.gitignore
### Codesniffer ###
phpcs.phar
phpcbf.phar
### PHPStorm ###
.idea/

View File

@@ -1,4 +0,0 @@
{
"bracketSameLine": true,
"tabWidth": 4
}

20
.vscode/settings.json vendored
View File

@@ -1,20 +0,0 @@
{
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
// "source.organizeImports": true // <-- when enabled, breaks tinymce required import order
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[php]": {
// "editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
"editor.defaultFormatter": "wongjn.php-sniffer"
},
"cSpell.words": ["TIMESTAMPDIFF"]
}

View File

@@ -1,7 +1,7 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
@@ -27,27 +27,45 @@ Laravel has the most extensive and thorough [documentation](https://laravel.com/
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
### Premium Partners
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
- **[Lendio](https://lendio.com)**
## Code Style
This project uses [Laravel Pint](https://laravel.com/docs/pint) for code styling. Pint is an opinionated PHP code style fixer for minimalists, built on top of PHP-CS-Fixer.
To automatically fix code style issues, run:
```bash
composer pint
```
To check for code style issues without fixing them:
```bash
composer pint-test
```
The code style configuration can be found in `pint.json`.
## Contributing

7
api.http Normal file
View File

@@ -0,0 +1,7 @@
### Get media items
GET http://127.0.0.1:8001/media
Accept: application/json
### Get media item
GET http://127.0.0.1:8001/media/SC-After-Dark.png
Accept: application/json

View File

@@ -1,83 +0,0 @@
<?php
namespace App\Conductors;
use App\Models\Media;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\InvalidCastException;
use Illuminate\Database\Eloquent\MissingAttributeException;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use LogicException;
class AnalyticsConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Analytics::class;
/**
* The default sorting field
* @var string
*/
protected $sort = 'created_at';
/**
* The default includes to include in a request.
*
* @var array
*/
protected $includes = ['duration'];
/**
* Return if the current model is visible.
*
* @param Model $model The model.
* @return boolean Allow model to be visible.
*/
public static function viewable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/analytics') === true);
}
/**
* Return if the current model is creatable.
*
* @return boolean Allow creating model.
*/
public static function creatable(): bool
{
return true;
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/analytics') === true);
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/analytics') === true);
}
}

View File

@@ -1,151 +0,0 @@
<?php
namespace App\Conductors;
use App\Models\Media;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\InvalidCastException;
use Illuminate\Database\Eloquent\MissingAttributeException;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use LogicException;
class ArticleConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Article::class;
/**
* The default sorting field
* @var string
*/
protected $sort = '-publish_at';
/**
* The included fields
*
* @var string[]
*/
protected $includes = ['attachments', 'user'];
/**
* Run a scope query on the collection before anything else.
*
* @param Builder $builder The builder in use.
*/
public function scope(Builder $builder): void
{
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/articles') === false) {
$builder
->where('publish_at', '<=', now());
}
}
/**
* Return if the current model is visible.
*
* @param Model $model The model.
* @return boolean Allow model to be visible.
*/
public static function viewable(Model $model): bool
{
if (Carbon::parse($model->publish_at)->isFuture() === true) {
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/articles') === false) {
return false;
}
}
return true;
}
/**
* Return if the current model is creatable.
*
* @return boolean Allow creating model.
*/
public static function creatable(): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/articles') === true);
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/articles') === true);
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/articles') === true);
}
/**
* Transform the final model data
*
* @param array $data The model data to transform.
* @return array The transformed model.
*/
public function transformFinal(array $data): array
{
unset($data['user_id']);
return $data;
}
/**
* Include Attachments Field.
*
* @param Model $model Them model.
* @return mixed The model result.
*/
public function includeAttachments(Model $model)
{
return $model->attachments()->get()->map(function ($attachment) {
return MediaConductor::includeModel(request(), 'attachments', $attachment->media);
});
}
/**
* Include User Field.
*
* @param Model $model Them model.
* @return mixed The model result.
*/
public function includeUser(Model $model)
{
return UserConductor::includeModel(request(), 'user', User::find($model['user_id']));
}
/**
* Transform the Hero field.
*
* @param mixed $value The current value.
* @return array The new value.
*/
public function transformHero(mixed $value): array
{
return MediaConductor::includeModel(request(), 'hero', Media::find($value));
}
}

View File

@@ -1,979 +0,0 @@
<?php
namespace App\Conductors;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class Conductor
{
/**
* The Conductors Model class.
*
* @var string|null
*/
protected $class = null;
/**
* The default sorting fields of a collection. Can be an array. Supports - and + prefixes.
*
* @var string|array
*/
protected $sort = "id";
/**
* The default collection size limit per request.
*
* @var integer
*/
protected $limit = 50;
/**
* The maximum collection size limit per request.
*
* @var integer
*/
protected $maxLimit = 100;
/**
* The default includes to include in a request.
*
* @var array
*/
protected $includes = [];
/**
* The default filters to use in a request.
*
* @var array
*/
protected $defaultFilters = [];
/**
* The conductor collection.
*
* @var Collection
*/
protected $collection = null;
/**
* The collection filter to apply.
*
* @var array
*/
protected $filterArray = [];
/**
* The conductor query.
*
* @var Builder
*/
private $query = null;
/**
* Split a string on commas, keeping quotes intact.
*
* @param string $string The string to split.
* @return array The split string.
*/
private function splitString(string $string): array
{
$parts = [];
$start = 0;
$len = strlen($string);
while ($start < $len) {
$commaPos = strpos($string, ',', $start);
$singlePos = strpos($string, '\'', $start);
$doublePos = strpos($string, '"', $start);
// Find the smallest position that is not false
$minPos = false;
if ($commaPos !== false) {
$minPos = $commaPos;
}
if ($singlePos !== false && ($minPos === false || $singlePos < $minPos)) {
$minPos = $singlePos;
}
if ($doublePos !== false && ($minPos === false || $doublePos < $minPos)) {
$minPos = $doublePos;
}
if ($minPos === false) {
// No more commas, single quotes, or double quotes found
$part = substr($string, $start);
$parts[] = trim($part);
break;
} else {
// Add the current part to the parts array
$part = substr($string, $start, ($minPos - $start));
$parts[] = trim($part);
// Update the start position to the next character after the comma, single quote, or double quote
if ($string[$minPos] === ',') {
$start = ($minPos + 1);
} else {
$quoteChar = $string[$minPos];
$endPos = strpos($string, $quoteChar, ($minPos + 1));
if ($endPos === false) {
$part = substr($string, ($minPos + 1));
$parts[] = trim($part);
break;
} else {
$part = substr($string, ($minPos + 1), ($endPos - $minPos - 1));
$parts[] = trim($part);
$start = ($endPos + 1);
}
}
}//end if
}//end while
return array_filter($parts, function ($value) {
return $value !== '';
});
}
/**
* Filter Collection based on the Request.
*
* @param Request $request The user request.
* @param array|null $limitFields A list of fields to limit the filter request to.
*/
private function filter(Request $request, array|null $limitFields = null): void
{
if (is_array($limitFields) === true && count($limitFields) === 0) {
$limitFields = null;
}
$filterFields = $request->all();
if ($limitFields !== null) {
$filterFields = array_intersect_key($filterFields, array_flip($limitFields));
}
$filterFields += $this->defaultFilters;
foreach ($filterFields as $field => $value) {
if (
is_array($limitFields) === false ||
in_array(strtolower($field), array_map('strtolower', $limitFields)) !== false
) {
$value = trim($value);
$operator = '';
$join = 'OR';
// Check if value has a operator and remove it if it's a number
if (preg_match('/^(!?=|[<>]=?|<>|!)([^=!<>].*)*$/', $value, $matches) > 0) {
$operator = $matches[1];
$value = ($matches[2] ?? '');
}
switch ($operator) {
case '=':
$operator = '==';
break;
case '!':
$operator = 'NOT LIKE';
$value = "%{$value}%";
break;
case '>':
case '<':
case '>=':
case '<=':
case '!=':
break;
case '<>':
$separatorPos = strpos($value, '|');
if ($separatorPos === false) {
$operator = '!=';
}
break;
default:
$operator = 'LIKE';
$value = "%{$value}%";
break;
}//end switch
$this->appendFilter($field, $operator, $value, $join);
}//end if
}//end foreach
if ($request->has('filter') === true) {
$this->appendFilterString($request->input('filter', ''), $limitFields);
}
$this->applyFilters();
}
/**
* Apple the filter array to the collection.
*/
final public function applyFilters(): void
{
$parseFunc = function ($filterArray, $query) use (&$parseFunc) {
$item = null;
$result = null;
$join = 'AND';
if (gettype($query) === 'array') {
$item = $query;
}
foreach ($filterArray as $condition) {
$currentResult = false;
if (is_array($condition) === true) {
if (isset($condition[0]) === true && is_array($condition[0]) === true) {
if ($item !== null) {
$currentResult = $parseFunc($condition, $item);
} else {
if ($join === 'OR') {
$query->orWhere(function ($subQuery) use ($parseFunc, $condition) {
$parseFunc($condition, $subQuery);
});
} else {
$query->where(function ($subQuery) use ($parseFunc, $condition) {
$parseFunc($condition, $subQuery);
});
}
}
} else {
list($field, $operator, $value) = $condition;
if ($item !== null) {
if (array_key_exists($field, $item) === true) {
switch ($operator) {
case '==':
$currentResult = ($item[$field] == $value);
break;
case 'NOT LIKE':
$currentResult = (stripos($item[$field], substr($value, 1, -1)) === false);
break;
case '>':
$currentResult = ($item[$field] > $value);
break;
case '<':
$currentResult = ($item[$field] < $value);
break;
case '>=':
$currentResult = ($item[$field] >= $value);
break;
case '<=':
$currentResult = ($item[$field] <= $value);
break;
case '!=':
$currentResult = ($item[$field] != $value);
break;
case '<>':
$separatorPos = strpos($value, '|');
if ($separatorPos !== false) {
$fieldInt = intval($item[$field]);
$currentResult = (
$fieldInt > intVal(
substr($value, 0, $separatorPos)
) && $fieldInt < intVal(substr($value, ($separatorPos + 1))));
} else {
$currentResult = ($item[$field] != $value);
}
break;
case 'LIKE':
$currentResult = (stripos($item[$field], substr($value, 1, -1)) !== false);
break;
}//end switch
}//end if
} else {
if ($operator === '==') {
$operator = '=';
}
if ($join === 'OR') {
if ($operator === '<>') {
$separatorPos = strpos($value, '|');
if ($separatorPos !== false) {
$query->orWhereBetween(
$field,
[substr($value, 0, $separatorPos), substr($value, ($separatorPos + 1))]
);
} else {
$query->orWhere($field, '!=', $value);
}
} else {
$query->orWhere($field, $operator, $value);
}
} else {
if ($operator === '<>') {
$separatorPos = strpos($value, '|');
if ($separatorPos !== false) {
$query->whereBetween(
$field,
[substr($value, 0, $separatorPos), substr($value, ($separatorPos + 1))]
);
} else {
$query->where($field, '!=', $value);
}
} else {
$query->where($field, $operator, $value);
}
}//end if
}//end if
}//end if
if ($item !== null) {
if ($result === null) {
$result = $currentResult;
} else {
if ($join === 'OR') {
$result = $result || $currentResult;
} else {
$result = $result && $currentResult;
}
}
}
$join = 'OR';
} else {
$join = $condition;
}//end if
}//end foreach
return $result;
};
$filterArray = $this->filterArray;
if (count($filterArray) === 0) {
$filterArray = $this->defaultFilters;
}
if (count($filterArray) !== 0) {
if ($this->collection !== null) {
$this->collection = $this->collection->filter(function ($item) use ($parseFunc) {
return $parseFunc($this->filterArray, $item);
});
} else {
$parseFunc($this->filterArray, $this->query);
}
}
}
/**
* Run the conductor on a Request to generate a collection and total.
*
* @param Request $request The request data.
* @return array The processed and transformed collection | the total rows found.
*/
final public static function request(Request $request): array
{
$conductor_class = get_called_class();
$conductor = new $conductor_class();
$total = 0;
try {
$conductor->query = $conductor->class::query();
} catch (\Throwable $e) {
throw new \Exception('Failed to create query builder instance for ' . $conductor->class . '.', 0, $e);
}
// Filter request
$limitFields = $conductor->fields(new $conductor->class());
if (is_array($limitFields) === false) {
$limitFields = [];
}
$conductor->filter($request, $limitFields);
// After Scope query
$conductor->query->where(function ($query) use ($conductor) {
$conductor->scope($query);
});
// Sort request
$sort = $request->input('sort', $conductor->sort);
if (strlen($sort) === 0) {
if (strlen($conductor->sort) > 0) {
$conductor->sort($conductor->sort);
}
} else {
$conductor->sort($sort);
}
// Get total
$total = $conductor->count();
// Paginate
$conductor->paginate($request->input('page', 1), $request->input('limit', -1), $request->input('offset', 0));
// Filter request
$fields = $conductor->fields(new $conductor->class());
if (is_array($fields) === false) {
$fields = [];
}
// Limit fields
$limitFields = array_map(function ($field) {
if (strpos($field, '.') !== false) {
return substr($field, 0, strpos($field, '.'));
}
return $field;
}, explode(',', $request->input('fields')));
if ($limitFields === null) {
$limitFields = $fields;
} else {
$limitFields = array_intersect($limitFields, $fields);
}
$conductor->limitFields($limitFields);
$conductor->collection = $conductor->query->get();
// Transform and Includes
$includes = $conductor->includes;
if (count($limitFields) > 0) {
$includes = array_intersect($limitFields, $conductor->includes);
}
$conductor->collection = $conductor->collection->map(
function ($model) use ($conductor, $includes, $limitFields) {
$conductor->applyIncludes($model, $includes);
if (count($limitFields) > 0) {
$model->setAppends(array_intersect($model->getAppends(), $limitFields));
}
$model = $conductor->transformModel($model);
return $model;
}
);
return [$conductor->collection, $total];
}
/**
* Run the conductor on a collection with the data stored in a Request.
*
* @param Request $request The request data.
* @param Collection $collection The collection.
* @return array The processed and transformed model data.
*/
final public static function collection(Request $request, Collection $collection): array
{
$conductor_class = get_called_class();
$conductor = new $conductor_class();
$conductor->collection = collect();
foreach ($collection as $item) {
if ($conductor->viewable($item) === true) {
$conductor->collection->push($conductor->transformModel($item));
}
}
// Filter request
$limitFields = $conductor->fields(new $conductor->class());
if (is_array($limitFields) === false) {
$limitFields = [];
}
$conductor->filter($request, $limitFields);
// Get total
$total = $conductor->collection->count();
// Sort request
$sort = $request->input('sort', $conductor->sort);
if (strlen($sort) === 0) {
if (strlen($conductor->sort) > 0) {
$conductor->sort($sort);
}
} else {
$conductor->sort($sort);
}
// Paginate
$conductor->paginate($request->input('page', 1), $request->input('limit', -1), $request->input('offset', 0));
return [$conductor->collection, $total];
}
/**
* Filter a custom query on a user request.
*
* @param Builder $query The custom query.
* @param Request $request The request.
* @param array|null $limitFields Limit the request to these fields.
*/
public static function filterQuery(Builder $query, Request $request, array|null $limitFields = null): Builder
{
$conductor_class = get_called_class();
$conductor = new $conductor_class();
$conductor->query = $query;
$conductor->filter($request, $limitFields);
return $conductor->query;
}
/**
* Run the conductor on a Model with the data stored in a Request.
*
* @param Request $request The request data.
* @param string $key The key prefix to use.
* @param Model|null $model The model.
* @return array The processed and transformed model data.
*/
final public static function includeModel(Request $request, string $key, mixed $model): array
{
$fields = [];
if ($request !== null && $request->has('fields') === true) {
$requestFields = $request->input('fields');
if ($requestFields !== null) {
$requestFields = explode(',', $requestFields);
if (in_array($key, $requestFields) === false) {
foreach ($requestFields as $field) {
if (strpos($field, $key . '.') === 0) {
$fields[] = substr($field, (strlen($key) + 1));
}
}
}
}
}
return static::model($fields, $model);
}
/**
* Run the conductor on a Model with the data stored in a Request.
*
* @param mixed $fields The fields to show.
* @param Model|null $model The model.
* @return array The processed and transformed model data.
*/
final public static function model(mixed $fields, mixed $model): array
{
if ($model === null) {
return null;
}
$conductor_class = get_called_class();
$conductor = new $conductor_class();
$modelFields = $conductor->fields(new $conductor->class());
// Limit fields
$limitFields = $modelFields;
if ($fields instanceof Request) {
if ($fields !== null && $fields->has('fields') === true) {
$requestFields = $fields->input('fields');
if ($requestFields !== null) {
$limitFields = array_intersect(explode(',', $requestFields), $modelFields);
}
}
} elseif (is_array($fields) === true && count($fields) > 0) {
$limitFields = array_intersect($fields, $modelFields);
}
if (empty($limitFields) === false) {
$modelAppends = $model->getAppends();
foreach (array_diff($modelFields, $limitFields) as $attribute) {
$key = array_search($attribute, $modelAppends);
if ($key !== false) {
unset($modelAppends[$key]);
} else {
unset($model[$attribute]);
}
}
$model->setAppends($modelAppends);
}
// Includes
$includes = array_intersect($limitFields, $conductor->includes);
$conductor->applyIncludes($model, $includes);
// Transform
$model = $conductor->transformModel($model);
return $model;
}
/**
* Return the current conductor collection count.
*
* @return integer The current collection count.
*/
final public function count(): int
{
if ($this->query !== null) {
return $this->query->count();
}
return 0;
}
/**
* Sort the conductor collection.
*
* @param mixed $fields A field name or array of field names to sort. Supports prefix of +/- to change direction.
*/
final public function sort(mixed $fields = null): void
{
$collectionSort = [];
if (is_string($fields) === true) {
$fields = explode(',', $fields);
} elseif ($fields === null) {
$fields = $this->sort;
}
if (is_array($fields) === true) {
foreach ($fields as $orderByField) {
$direction = 'asc';
$directionChar = substr($orderByField, 0, 1);
if (in_array($directionChar, ['-', '+']) === true) {
$orderByField = substr($orderByField, 1);
if ($directionChar === '-') {
$direction = 'desc';
}
}
if ($this->collection !== null) {
$collectionSort[] = [trim($orderByField), $direction];
} else {
$this->query->orderBy(trim($orderByField), $direction);
}
}
} else {
throw new \InvalidArgumentException('Expected string or array, got ' . gettype($fields));
}//end if
if ($this->collection !== null) {
$this->collection = $this->collection->sortBy($collectionSort)->values();
}
}
/**
* Paginate the conductor collection.
*
* @param integer $page The current page to return.
* @param integer $limit The limit of items to include or use default.
* @param integer $offset Offset the page count after this count of rows.
* @return mixed
*/
final public function paginate(int $page = 1, int $limit = -1, int $offset = 0)
{
// Limit
if ($limit < 1) {
$limit = $this->limit;
} else {
$limit = min($limit, $this->maxLimit);
}
// Page
if ($page < 1) {
$page = 1;
}
// After
if ($offset < 0) {
$offset = 0;
}
if ($this->collection !== null) {
$this->collection = $this->collection->splice(((($page - 1) * $limit) + $offset), $limit);
} else {
$this->query->limit($limit);
$this->query->offset((($page - 1) * $limit) + $offset);
}
}
/**
* Apply a list of includes to the model.
*
* @param Model $model The model to append.
* @param array $includes The list of includes to include.
*/
final public function applyIncludes(Model $model, array $includes): void
{
foreach ($includes as $include) {
$includeMethodName = 'include' . Str::studly($include);
if (method_exists($this, $includeMethodName) === true) {
$attributeName = Str::snake($include);
$attributeValue = $this->{$includeMethodName}($model);
if ($attributeValue !== null) {
$model->$attributeName = $this->{$includeMethodName}($model);
}
}
}
}
/**
* Limit the returned fields in the conductor collection.
*
* @param array $fields An array of field names.
*/
final public function limitFields(array $fields): void
{
if (empty($fields) !== true) {
$this->query->select(array_diff($fields, $this->includes));
}
}
/**
* Filter the conductor collection using raw data.
*
* @param string $rawFilter The raw filter string to parse.
* @param array|null $limitFields The fields to allow in the filter string.
* @param string $outerJoin The join for this filter group.
*/
final public function appendFilterString(string $rawFilter, array|null $limitFields = null, string $outerJoin = 'OR'): void
{
if ($rawFilter === '') {
return;
}
if (substr($rawFilter, -1) !== ',') {
$rawFilter .= ',';
}
$parseFunc = function ($string, &$i = 0) use (&$parseFunc, $limitFields) {
$tokens = [];
$ignoreUntil = '';
$skipUntil = '';
$field = '';
$value = null;
$set = &$field;
for (; $i < strlen($string); $i++) {
$char = $string[$i];
if ($skipUntil !== '' && $char !== $skipUntil) {
continue;
}
if ($ignoreUntil === '') {
if ($char === '\'' || $char === '"') {
$ignoreUntil = $char;
} elseif ($char === ':') {
if ($field === '') {
$skipUntil = ',';
continue;
}
if ($field[0] === '\'' || $field[0] === '"') {
$field = substr($field, 1, -1);
}
$set = &$value;
continue;
} elseif (($char === ')' && $string[($i + 1)] === ',') || $char === ',') {
if ($value === null) {
$tokens[] = $field;
} else {
$value = trim($value);
$operator = 'LIKE';
// Check if value has a operator and remove it if it's a number
if (preg_match('/^(!?=|[<>]=?|<>|!)([^=!<>].*)*$/', $value, $matches) > 0) {
$operator = $matches[1];
$value = ($matches[2] ?? '');
}
if ($value[0] === '\'' || $value[0] === '"') {
$value = substr($value, 1, -1);
}
if ($operator === 'LIKE') {
$value = "%{$value}%";
}
if (
is_array($limitFields) === false ||
in_array(strtolower($field), array_map('strtolower', $limitFields)) !== false
) {
$tokens[] = [$field, $operator, $value];
}
}//end if
$field = '';
$value = null;
$set = &$field;
if ($char === ')') {
$i++;
return $tokens;
}
continue;
} elseif ($char === '(') {
if ($field === '') {
$i++;
$tokens[] = $parseFunc($string, $i);
continue;
}
}//end if
} elseif ($char === $ignoreUntil) {
$ignoreUntil = '';
}//end if
$set .= $char;
}//end for
return $tokens;
};
$i = 0;
$filterArray = $parseFunc($rawFilter, $i);
if (count($this->filterArray) !== 0) {
$this->filterArray[] = $outerJoin;
}
$this->filterArray[] = $filterArray;
}
/**
* Append a field to the filter array.
*
* @param string $field The field name to append.
* @param string $operator The operator to append.
* @param string $value The value to append.
* @param string $join The join to append.
*/
final public function appendFilter(string $field, string $operator, string $value, string $join = 'OR'): void
{
if (count($this->filterArray) !== 0) {
$this->filterArray[] = $join;
}
$this->filterArray[] = [$field, $operator, $value];
}
/**
* Run a scope query on the collection before anything else.
*
* @param Builder $builder The builder in use.
*/
public function scope(Builder $builder): void
{
}
/**
* Return an array of model fields visible to the current user.
*
* @param Model $model The model in question.
* @return array The array of field names.
*/
public function fields(Model $model): array
{
$visibleFields = $model->getVisible();
if (empty($visibleFields) === true) {
$visibleFields = $model->getConnection()
->getSchemaBuilder()
->getColumnListing($model->getTable());
}
$appends = $model->getAppends();
if (is_array($appends) === true) {
$visibleFields = array_merge($visibleFields, $appends);
}
if (is_array($this->includes) === true) {
$visibleFields = array_merge($visibleFields, $this->includes);
}
return $visibleFields;
}
/**
* Transform the passed Model to an array
*
* @param Model $model The model to transform.
* @return array The transformed model.
*/
protected function transformModel(Model $model): array
{
$result = $this->transform($model);
foreach ($result as $key => $value) {
$transformFunction = 'transform' . Str::studly($key);
if (method_exists($this, $transformFunction) === true) {
$result[$key] = $this->$transformFunction($value);
}
}
$result = $this->transformFinal($result);
return $result;
}
/**
* Transform the passed Model to an array
*
* @param Model $model The model to transform.
* @return array The transformed model.
*/
public function transform(Model $model): array
{
$result = $model->toArray();
$fields = $this->fields($model);
if (is_array($fields) === true) {
$result = array_intersect_key($result, array_flip($fields));
}
return $result;
}
/**
* Final Transform of the model array
*
* @param array $data The model array to transform.
* @return array The transformed model.
*/
public function transformFinal(array $data): array
{
return $data;
}
/**
* Is the passed model viewable by the current user?
*
* @param Model $model The model in question.
* @return boolean Is the model viewable.
*/
public static function viewable(Model $model): bool
{
return true;
}
/**
* Is the model creatable by the current user?
*
* @return boolean Is the model creatable.
*/
public static function creatable(): bool
{
return true;
}
/**
* Is the passed model updatable by the current user?
*
* @param Model $model The model in question.
* @return boolean Is the model updatable.
*/
public static function updatable(Model $model): bool
{
return true;
}
/**
* Is the passed model destroyable by the current user?
*
* @param Model $model The model in question.
* @return boolean Is the model destroyable.
*/
public static function destroyable(Model $model): bool
{
return true;
}
}

View File

@@ -1,127 +0,0 @@
<?php
namespace App\Conductors;
use App\Models\Media;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\InvalidCastException;
use Illuminate\Database\Eloquent\Model;
class EventConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Event::class;
/**
* The default sorting field
* @var string
*/
protected $sort = '-start_at';
/**
* The included fields
* @var string[]
*/
protected $includes = ['attachments'];
/**
* Run a scope query on the collection before anything else.
*
* @param Builder $builder The builder in use.
*/
public function scope(Builder $builder): void
{
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/events') === false) {
$builder
->where('status', '!=', 'draft')
->where('publish_at', '<=', now());
}
}
/**
* Return if the current model is visible.
*
* @param Model $model The model.
* @return boolean Allow model to be visible.
*/
public static function viewable(Model $model): bool
{
if (strtolower($model->status) === 'draft' || Carbon::parse($model->publish_at)->isFuture() === true) {
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/events') === false) {
return false;
}
}
return true;
}
/**
* Return if the current model is creatable.
*
* @return boolean Allow creating model.
*/
public static function creatable(): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/events') === true);
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/events') === true);
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/events') === true);
}
/**
* Include Attachments Field.
*
* @param Model $model Them model.
* @return mixed The model result.
*/
public function includeAttachments(Model $model)
{
$user = auth()->user();
return $model->attachments()->get()->map(function ($attachment) use ($user) {
if ($attachment->private === false || ($user !== null && ($user->hasPermission('admin/events') === true || $attachment->users->contains($user) === true))) {
return MediaConductor::includeModel(request(), 'attachments', $attachment->media);
}
});
}
/**
* Transform the Hero field.
*
* @param mixed $value The current value.
* @return array The new value.
*/
public function transformHero(mixed $value): array
{
return MediaConductor::includeModel(request(), 'hero', Media::find($value));
}
}

View File

@@ -1,148 +0,0 @@
<?php
namespace App\Conductors;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User;
class MediaConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Media::class;
/**
* The default sorting field
* @var string
*/
protected $sort = 'created_at';
/**
* The included fields
*
* @var string[]
*/
protected $includes = ['user'];
/**
* The default filters to use in a request.
*
* @var array
*/
protected $defaultFilters = [
'status' => 'OK'
];
/**
* Return an array of model fields visible to the current user.
*
* @param Model $model The model in question.
* @return array The array of field names.
*/
public function fields(Model $model): array
{
$fields = parent::fields($model);
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/media') === false) {
$fields = arrayRemoveItem($fields, ['permission', 'storage']);
}
return $fields;
}
/**
* Run a scope query on the collection before anything else.
*
* @param Builder $builder The builder in use.
*/
public function scope(Builder $builder): void
{
$user = auth()->user();
if ($user === null) {
$builder->where('permission', '');
} else {
$builder->where('permission', '')->orWhereIn('permission', $user->permissions);
}
}
/**
* Return if the current model is visible.
*
* @param Model $model The model.
* @return boolean Allow model to be visible.
*/
public static function viewable(Model $model): bool
{
if ($model->permission !== '') {
$user = auth()->user();
if ($user === null || $user->hasPermission($model->permission) === false) {
return false;
}
}
return true;
}
/**
* Return if the current model is creatable.
*
* @return boolean Allow creating model.
*/
public static function creatable(): bool
{
$user = auth()->user();
return ($user !== null);
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && (strcasecmp($model->user_id, $user->id) === 0 || $user->hasPermission('admin/media') === true));
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && ($model->user_id === $user->id || $user->hasPermission('admin/media') === true));
}
/**
* Transform the final model data
*
* @param array $data The model data to transform.
* @return array The transformed model.
*/
public function transformFinal(array $data): array
{
unset($data['user_id']);
return $data;
}
/**
* Include User Field.
*
* @param Model $model Them model.
* @return mixed The model result.
*/
public function includeUser(Model $model)
{
return UserConductor::includeModel(request(), 'user', User::find($model['user_id']));
}
}

View File

@@ -1,58 +0,0 @@
<?php
namespace App\Conductors;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User;
class ShortlinkConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Shortlink::class;
/**
* The default sorting field
* @var string
*/
protected $sort = 'created_at';
/**
* Return if the current model is creatable.
*
* @return boolean Allow creating model.
*/
public static function creatable(): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/shortlinks') === true);
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/shortlinks') === true);
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/shortlinks') === true);
}
}

View File

@@ -1,39 +0,0 @@
<?php
namespace App\Conductors;
use Illuminate\Database\Eloquent\Model;
class SubscriptionConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\Subscription::class;
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && ((strcasecmp($model->email, $user->email) === 0 && $user->email_verified_at !== null) || $user->hasPermission('admin/subscriptions') === true));
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && ((strcasecmp($model->email, $user->email) === 0 && $user->email_verified_at !== null) || $user->hasPermission('admin/subscriptions') === true));
}
}

View File

@@ -1,80 +0,0 @@
<?php
namespace App\Conductors;
use Illuminate\Database\Eloquent\Model;
class UserConductor extends Conductor
{
/**
* The Model Class
* @var string
*/
protected $class = \App\Models\User::class;
/**
* Return the visible API fields.
*
* @param Model $model The model.
* @return string[] The fields visible.
*/
public function fields(Model $model): array
{
$user = auth()->user();
if ($user === null || $user->hasPermission('admin/users') === false) {
return ['id', 'display_name'];
}
return parent::fields($model);
}
/**
* Transform the passed Model to an array
*
* @param Model $model The model to transform.
* @return array The transformed model.
*/
public function transform(Model $model): array
{
$user = auth()->user();
$data = $model->toArray();
if ($user === null || ($user->hasPermission('admin/users') === false && strcasecmp($user->id, $model->id) !== 0)) {
$fields = ['id', 'display_name'];
$data = arrayLimitKeys($data, $fields);
} else {
$data['permissions'] = $user->permissions;
}
return $data;
}
/**
* Return if the current model is updatable.
*
* @param Model $model The model.
* @return boolean Allow updating model.
*/
public static function updatable(Model $model): bool
{
$user = auth()->user();
if ($user !== null) {
return ($user->hasPermission('admin/users') === true || strcasecmp($user->id, $model->id) === 0);
}
return false;
}
/**
* Return if the current model is destroyable.
*
* @param Model $model The model.
* @return boolean Allow deleting model.
*/
public static function destroyable(Model $model): bool
{
$user = auth()->user();
return ($user !== null && $user->hasPermission('admin/users') === true);
}
}

View File

@@ -1,63 +0,0 @@
<?php
namespace App\Console\Commands;
use App\Jobs\StoreUploadedFileJob;
use Illuminate\Console\Command;
use App\Models\Media;
use File;
use Symfony\Component\Console\Input\InputOption;
class MediaMigrate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'media:migrate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Migrate the uploads folder to the CDN';
/**
* Configure the command options.
*/
protected function configure(): void
{
$this->addOption(
'replace',
null,
InputOption::VALUE_NONE,
'Replace existing files'
);
}
/**
* Execute the console command.
*/
public function handle(): void
{
$replace = $this->option('replace');
$files = File::allFiles(public_path('uploads'));
foreach ($files as $file) {
$filename = pathinfo($file, PATHINFO_BASENAME);
$medium = Media::where('name', $filename)->first();
if ($medium !== null) {
$medium->update(['status' => 'Processing media']);
StoreUploadedFileJob::dispatch($medium, $file, $replace)->onQueue('media');
} else {
unlink($file);
}
}
}
}

View File

@@ -1,66 +0,0 @@
<?php
namespace App\Console\Commands;
use App\Jobs\StoreUploadedFileJob;
use Illuminate\Console\Command;
use App\Models\Media;
use Symfony\Component\Console\Input\InputOption;
class MediaRebuild extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'media:rebuild';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Rebuild the media table';
/**
* Configure the command options.
*/
protected function configure(): void
{
$this->addOption(
'replace',
null,
InputOption::VALUE_NONE,
'Replace existing files'
);
$this->addOption(
'all',
null,
InputOption::VALUE_NONE,
'Rebuild all variants'
);
}
/**
* Execute the console command.
*/
public function handle(): void
{
$replace = $this->option('replace');
$all = $this->option('replace');
$media = [];
if ($all === true) {
$media = Media::all();
} else {
$media = Media::where(['variants' => ''])->orWhere(['variants' => '[]'])->orWhere(['variants' => '{}'])->get();
}
foreach ($media as $medium) {
StoreUploadedFileJob::dispatch($medium, '', $replace)->onQueue('media');
}
}
}

View File

@@ -1,29 +0,0 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule The schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}

View File

@@ -1,169 +0,0 @@
<?php
namespace App\Enum;
class CurlErrorCodes extends Enum
{
public const CURLE_UNSUPPORTED_PROTOCOL = 1;
public const CURLE_FAILED_INIT = 2;
public const CURLE_URL_MALFORMAT = 3;
public const CURLE_URL_MALFORMAT_USER = 4;
public const CURLE_COULDNT_RESOLVE_PROXY = 5;
public const CURLE_COULDNT_RESOLVE_HOST = 6;
public const CURLE_COULDNT_CONNECT = 7;
public const CURLE_FTP_WEIRD_SERVER_REPLY = 8;
public const CURLE_REMOTE_ACCESS_DENIED = 9;
public const CURLE_FTP_WEIRD_PASS_REPLY = 11;
public const CURLE_FTP_WEIRD_PASV_REPLY = 13;
public const CURLE_FTP_WEIRD_227_FORMAT = 14;
public const CURLE_FTP_CANT_GET_HOST = 15;
public const CURLE_FTP_COULDNT_SET_TYPE = 17;
public const CURLE_PARTIAL_FILE = 18;
public const CURLE_FTP_COULDNT_RETR_FILE = 19;
public const CURLE_QUOTE_ERROR = 21;
public const CURLE_HTTP_RETURNED_ERROR = 22;
public const CURLE_WRITE_ERROR = 23;
public const CURLE_UPLOAD_FAILED = 25;
public const CURLE_READ_ERROR = 26;
public const CURLE_OUT_OF_MEMORY = 27;
public const CURLE_OPERATION_TIMEDOUT = 28;
public const CURLE_FTP_PORT_FAILED = 30;
public const CURLE_FTP_COULDNT_USE_REST = 31;
public const CURLE_RANGE_ERROR = 33;
public const CURLE_HTTP_POST_ERROR = 34;
public const CURLE_SSL_CONNECT_ERROR = 35;
public const CURLE_BAD_DOWNLOAD_RESUME = 36;
public const CURLE_FILE_COULDNT_READ_FILE = 37;
public const CURLE_LDAP_CANNOT_BIND = 38;
public const CURLE_LDAP_SEARCH_FAILED = 39;
public const CURLE_FUNCTION_NOT_FOUND = 41;
public const CURLE_ABORTED_BY_CALLBACK = 42;
public const CURLE_BAD_FUNCTION_ARGUMENT = 43;
public const CURLE_INTERFACE_FAILED = 45;
public const CURLE_TOO_MANY_REDIRECTS = 47;
public const CURLE_UNKNOWN_TELNET_OPTION = 48;
public const CURLE_TELNET_OPTION_SYNTAX = 49;
public const CURLE_PEER_FAILED_VERIFICATION = 51;
public const CURLE_GOT_NOTHING = 52;
public const CURLE_SSL_ENGINE_NOTFOUND = 53;
public const CURLE_SSL_ENGINE_SETFAILED = 54;
public const CURLE_SEND_ERROR = 55;
public const CURLE_RECV_ERROR = 56;
public const CURLE_SSL_CERTPROBLEM = 58;
public const CURLE_SSL_CIPHER = 59;
public const CURLE_SSL_CACERT = 60;
public const CURLE_BAD_CONTENT_ENCODING = 61;
public const CURLE_LDAP_INVALID_URL = 62;
public const CURLE_FILESIZE_EXCEEDED = 63;
public const CURLE_USE_SSL_FAILED = 64;
public const CURLE_SEND_FAIL_REWIND = 65;
public const CURLE_SSL_ENGINE_INITFAILED = 66;
public const CURLE_LOGIN_DENIED = 67;
public const CURLE_TFTP_NOTFOUND = 68;
public const CURLE_TFTP_PERM = 69;
public const CURLE_REMOTE_DISK_FULL = 70;
public const CURLE_TFTP_ILLEGAL = 71;
public const CURLE_TFTP_UNKNOWNID = 72;
public const CURLE_REMOTE_FILE_EXISTS = 73;
public const CURLE_TFTP_NOSUCHUSER = 74;
public const CURLE_CONV_FAILED = 75;
public const CURLE_CONV_REQD = 76;
public const CURLE_SSL_CACERT_BADFILE = 77;
public const CURLE_REMOTE_FILE_NOT_FOUND = 78;
public const CURLE_SSH = 79;
public const CURLE_SSL_SHUTDOWN_FAILED = 80;
public const CURLE_AGAIN = 81;
public const CURLE_SSL_CRL_BADFILE = 82;
public const CURLE_SSL_ISSUER_ERROR = 83;
public const CURLE_FTP_PRET_FAILED = 84;
public const CURLE_RTSP_CSEQ_ERROR = 85;
public const CURLE_RTSP_SESSION_ERROR = 86;
public const CURLE_FTP_BAD_FILE_LIST = 87;
public const CURLE_CHUNK_FAILED = 88;
/**
* Curl Error messages
* @var string[]
*/
public static $messages = [
1 => 'Unsupported protocol.',
2 => 'Failed initalization.',
3 => 'Invalid URL format.',
4 => 'CURLE_URL_MALFORMAT_USER.',
5 => 'Could not resolve proxy.',
6 => 'Could not resolve host.',
7 => 'Could not connect to host.',
8 => 'Invalid reply from FTP server.',
9 => 'Access denied on host.',
11 => 'Invalid pass reply from FTP server.',
13 => 'Invalid pasv reply from FTP server.',
14 => 'Invalid 227 format from FTP server.',
15 => 'Could not get FTP host.',
17 => 'Could not set type for FTP transfer.',
18 => 'Invalid partial size.',
19 => 'Could not retrieve file from FTP server.',
21 => 'Quote error.',
22 => 'HTTP server returned error.',
23 => 'File write error.',
25 => 'Upload file error.',
26 => 'File read error.',
27 => 'Out of memory.',
28 => 'File transfer timed out.',
30 => 'Invalid port for FTP server.',
31 => 'Could not use rest for FTP server.',
33 => 'File range error.',
34 => 'Invalid POST for HTTP server.',
35 => 'SSL connectio error.',
36 => 'Invalid resume download.',
37 => 'Could not read file.',
38 => 'Could not bind to LDAP.',
39 => 'LDAP search failed.',
41 => 'Function not found.',
42 => 'Aborted by callback.',
43 => 'Bad function argument.',
45 => 'Interface failed.',
47 => 'Too many redirects.',
48 => 'Unknown telnet option.',
49 => 'Telnet option syntax invalid.',
51 => 'Peer failed verification.',
52 => 'Did not receive any data.',
53 => 'SSL engine was not found.',
54 => 'SSL engine failed.',
55 => 'Send data error.',
56 => 'Receive data error.',
58 => 'SSL certificate error.',
59 => 'SSL cipher error.',
60 => 'SSL CACertificate failed.',
61 => 'Invalid content encoding.',
62 => 'Invalid LDAP url.',
63 => 'Filesize exceeded.',
64 => 'SSL Failed.',
65 => 'CURLE_SEND_FAIL_REWIND.',
66 => 'SSL engine initalization failed.',
67 => 'CURLE_LOGIN_DENIED.',
68 => 'CURLE_TFTP_NOTFOUND.',
69 => 'CURLE_TFTP_PERM.',
70 => 'CURLE_REMOTE_DISK_FULL.',
71 => 'CURLE_TFTP_ILLEGAL.',
72 => 'CURLE_TFTP_UNKNOWNID.',
73 => 'Remote file already exists.',
74 => 'No such user on FTP server.',
75 => 'Conversion failed.',
76 => 'Conversion required.',
77 => 'SSL CACertificate bad file.',
78 => 'Remove file not found.',
79 => 'SSH error.',
80 => 'SSL Shutdown failed.',
81 => 'Again.',
82 => 'SSL bad CRL file.',
83 => 'SSL issuer error.',
84 => 'FTP pret failed.',
85 => 'CURLE_RTSP_CSEQ_ERROR.',
86 => 'CURLE_RTSP_SESSION_ERROR.',
87 => 'CURLE_FTP_BAD_FILE_LIST.',
88 => 'CURLE_CHUNK_FAILED.',
];
}

View File

@@ -1,71 +0,0 @@
<?php
namespace App\Enum;
use ReflectionClass;
class Enum
{
/**
* Message list
*
* @var array<string<static>>
*/
public static $messages = [];
/**
* Caches reflections of enum subclasses.
*
* @var array<class-string<static>, ReflectionClass<static>>
*/
public static $reflectionCache = [];
/**
* Returns a reflection of the enum subclass.
*
* @return ReflectionClass<static>
*/
public static function getReflection(): ReflectionClass
{
$class = static::class;
return static::$reflectionCache[$class] ??= new ReflectionClass($class);
}
/**
* Returns the constants in the enum subclass
*
* @return array<static>
*/
public static function getConstants(): array
{
return static::getReflection()->getConstants();
}
/**
* Returns the constants values in the enum subclass
*
* @return array<static>
*/
public static function getConstantValues(): array
{
return array_values(static::getReflection()->getConstants());
}
/**
* Returns a message from the enum subclass
*
* @return string
*/
public static function getMessage(int $messageIndex, string $defaultMessage = 'Unknown'): string
{
if (array_key_exists($messageIndex, self::$messages) === true) {
return self::$messages[$messageIndex];
}
return $defaultMessage;
}
}

View File

@@ -1,165 +0,0 @@
<?php
namespace App\Enum;
class HttpResponseCodes extends Enum
{
public const HTTP_CONTINUE = 100;
public const HTTP_SWITCHING_PROTOCOLS = 101;
public const HTTP_PROCESSING = 102;
public const HTTP_OK = 200;
public const HTTP_CREATED = 201;
public const HTTP_ACCEPTED = 202;
public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
public const HTTP_NO_CONTENT = 204;
public const HTTP_RESET_CONTENT = 205;
public const HTTP_PARTIAL_CONTENT = 206;
public const HTTP_MULTI_STATUS = 207;
public const HTTP_ALREADY_REPORTED = 208;
public const HTTP_IM_USED = 226;
public const HTTP_MULTIPLE_CHOICES = 300;
public const HTTP_MOVED_PERMANENTLY = 301;
public const HTTP_FOUND = 302;
public const HTTP_SEE_OTHER = 303;
public const HTTP_NOT_MODIFIED = 304;
public const HTTP_USE_PROXY = 305;
public const HTTP_RESERVED = 306;
public const HTTP_TEMPORARY_REDIRECT = 307;
public const HTTP_PERMANENTLY_REDIRECT = 308;
public const HTTP_BAD_REQUEST = 400;
public const HTTP_UNAUTHORIZED = 401;
public const HTTP_PAYMENT_REQUIRED = 402;
public const HTTP_FORBIDDEN = 403;
public const HTTP_NOT_FOUND = 404;
public const HTTP_METHOD_NOT_ALLOWED = 405;
public const HTTP_NOT_ACCEPTABLE = 406;
public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
public const HTTP_REQUEST_TIMEOUT = 408;
public const HTTP_CONFLICT = 409;
public const HTTP_GONE = 410;
public const HTTP_LENGTH_REQUIRED = 411;
public const HTTP_PRECONDITION_FAILED = 412;
public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
public const HTTP_REQUEST_URI_TOO_LONG = 414;
public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
public const HTTP_EXPECTATION_FAILED = 417;
public const HTTP_I_AM_A_TEAPOT = 418;
public const HTTP_MISDIRECTED_REQUEST = 421;
public const HTTP_UNPROCESSABLE_ENTITY = 422;
public const HTTP_LOCKED = 423;
public const HTTP_FAILED_DEPENDENCY = 424;
public const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425;
public const HTTP_UPGRADE_REQUIRED = 426;
public const HTTP_PRECONDITION_REQUIRED = 428;
public const HTTP_TOO_MANY_REQUESTS = 429;
public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
public const HTTP_INTERNAL_SERVER_ERROR = 500;
public const HTTP_NOT_IMPLEMENTED = 501;
public const HTTP_BAD_GATEWAY = 502;
public const HTTP_SERVICE_UNAVAILABLE = 503;
public const HTTP_GATEWAY_TIMEOUT = 504;
public const HTTP_VERSION_NOT_SUPPORTED = 505;
public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506;
public const HTTP_INSUFFICIENT_STORAGE = 507;
public const HTTP_LOOP_DETECTED = 508;
public const HTTP_NOT_EXTENDED = 510;
public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511;
/**
* HTTP Response Messages
* @var string[]
*/
public static $statusTexts = [
100 => 'Continue.',
101 => 'Switching Protocols.',
102 => 'Processing.',
// RFC2518
200 => 'OK.',
201 => 'Created.',
202 => 'Accepted.',
203 => 'Non-Authoritative Information.',
204 => 'No Content.',
205 => 'Reset Content.',
206 => 'Partial Content.',
207 => 'Multi-Status.',
// RFC4918
208 => 'Already Reported.',
// RFC5842
226 => 'IM Used.',
// RFC3229
300 => 'Multiple Choices.',
301 => 'Moved Permanently.',
302 => 'Found.',
303 => 'See Other.',
304 => 'Not Modified.',
305 => 'Use Proxy.',
307 => 'Temporary Redirect.',
308 => 'Permanent Redirect.',
// RFC7238
400 => 'Bad Request.',
401 => 'Unauthorized.',
402 => 'Payment Required.',
403 => 'Forbidden.',
404 => 'Not Found.',
405 => 'Method Not Allowed.',
406 => 'Not Acceptable.',
407 => 'Proxy Authentication Required.',
408 => 'Request Timeout.',
409 => 'Conflict.',
410 => 'Gone.',
411 => 'Length Required.',
412 => 'Precondition Failed.',
413 => 'Payload Too Large.',
414 => 'URI Too Long.',
415 => 'Unsupported Media Type.',
416 => 'Range Not Satisfiable.',
417 => 'Expectation Failed.',
418 => 'I\'m a teapot.',
// RFC2324
421 => 'Misdirected Request.',
// RFC7540
422 => 'Unprocessable Entity.',
// RFC4918
423 => 'Locked.',
// RFC4918
424 => 'Failed Dependency.',
// RFC4918
425 => 'Reserved for WebDAV advanced collections expired proposal.',
// RFC2817
426 => 'Upgrade Required.',
// RFC2817
428 => 'Precondition Required.',
// RFC6585
429 => 'Too Many Requests.',
// RFC6585
431 => 'Request Header Fields Too Large.',
// RFC6585
451 => 'Unavailable For Legal Reasons.',
// RFC7725
500 => 'Internal Server Error.',
501 => 'Not Implemented.',
502 => 'Bad Gateway.',
503 => 'Service Unavailable.',
504 => 'Gateway Timeout.',
505 => 'HTTP Version Not Supported.',
506 => 'Variant Also Negotiates.',
// RFC2295
507 => 'Insufficient Storage.',
// RFC4918
508 => 'Loop Detected.',
// RFC5842
510 => 'Not Extended.',
// RFC2774
511 => 'Network Authentication Required.',
// RFC6585
];
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Exceptions;
use Exception;
class FileInvalidException extends Exception
{
/**
* The error code of the exception.
*
* @var int
*/
protected $code;
/**
* The error message of the exception.
*
* @var string
*/
protected $message;
/**
* Create a new exception instance.
*
* @param string $message
* @param int $code
* @return void
*/
public function __construct(string $message, int $code = 0)
{
$this->message = $message;
$this->code = $code;
parent::__construct($message, $code);
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Exceptions;
use Exception;
class FileTooLargeException extends Exception
{
/**
* The error code of the exception.
*
* @var int
*/
protected $code;
/**
* The error message of the exception.
*
* @var string
*/
protected $message;
/**
* Create a new exception instance.
*
* @param string $message
* @param int $code
* @return void
*/
public function __construct(string $message, int $code = 0)
{
$this->message = $message;
$this->code = $code;
parent::__construct($message, $code);
}
}

View File

@@ -1,65 +0,0 @@
<?php
namespace App\Exceptions;
use App\Enum\HttpResponseCodes;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
use PDOException;
use Symfony\Component\HttpKernel\Exception\HttpException;
class Handler extends ExceptionHandler
{
/**
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
*/
public function register(): void
{
// $this->renderable(function (HttpException $e, $request) {
// if ($request->is('api/*')) {
// $message = $e->getMessage();
// if ($message === '') {
// $message = HttpResponseCodes::$statusTexts[$e->getStatusCode()];
// }
// return response()->json([
// 'message' => $message
// ], $e->getStatusCode());
// }
// });
$this->renderable(function (NotFoundHttpException $e, $request) {
if ($request->is('api/*') === true) {
return response()->json([
'message' => 'Resource not found'
], 404);
}
});
$this->renderable(function (PDOException $e, $request) {
if ($request->is('api/*') === true) {
return response()->json([
'message' => 'The server is currently unavailable'
], 503);
}
});
$this->reportable(function (Throwable $e) {
//
});
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Filters;
use App\Models\Subscriber;
class SubscriptionFilter extends FilterAbstract
{
/**
* The model class to filter
*
* @var mixed
*/
protected $class = \App\Models\Subscription::class;
/**
* Return an array of attributes visible in the results
*
* @param array $attributes Attributes currently visible.
* @param User|null $user Current logged in user or null.
* @return mixed
*/
protected function seeAttributes(array $attributes, mixed $user)
{
if ($user?->hasPermission('admin/users') !== true) {
return ['id', 'email', 'confirmed_at'];
}
}
}

181
app/Helpers.php Normal file
View File

@@ -0,0 +1,181 @@
<?php
namespace App;
use DateTime;
use Illuminate\Support\Facades\Log;
class Helpers
{
/**
* Get the maximum upload size in bytes.
*/
public static function getMaxUploadSize(): int
{
return min(
self::stringToBytes(ini_get('post_max_size')),
self::stringToBytes(ini_get('upload_max_filesize'))
);
}
public static function stringToBytes(string $val): int
{
if (empty($val)) {
$val = 0;
}
$val = trim($val);
$last = strtolower($val[strlen($val) - 1]);
$val = floatval($val);
switch ($last) {
case 'g':
$val *= (1024 * 1024 * 1024); //1073741824
break;
case 'm':
$val *= (1024 * 1024); //1048576
break;
case 'k':
$val *= 1024;
break;
}
return $val;
}
public static function bytesToString(int|float|string $bytes): string
{
if (!is_numeric($bytes)) {
return '0 bytes';
}
$units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
for ($i = 0; $bytes > 1024; $i++) {
$bytes /= 1024;
}
return round($bytes, 2) . ' ' . $units[$i];
}
public static function arrayToString(array $array, string $separator = ','): string
{
return implode($separator, array_map(function ($item) use ($separator) {
if (str_contains($item, $separator)) {
return '"' . str_replace('"', '\\"', $item) . '"';
} else {
return $item;
}
}, $array));
}
public static function stringToArray(string $string, string $separator = ','): array
{
return array_map(function ($item) {
// Remove quotes and unescape any escaped quotes within the string
return str_replace('\\"', '"', trim($item, '"'));
}, explode($separator, $string));
}
public static function timestampNoSeconds(string $timestamp): string
{
if(empty($timestamp)) {
return '';
}
$datetime = new DateTime($timestamp);
return $datetime->format('Y-m-d\TH:i');
}
public static function isUnderAge(mixed $ages): bool
{
if(!is_string($ages)) {
return true;
}
preg_match('/\d+/', $ages, $matches);
if (empty($matches)) {
return true;
}
$firstNumber = $matches[0];
return ($firstNumber <= 8);
}
public static function createTimeDurationStr(string $startStr, string $endStr): array
{
try {
$start = new DateTime($startStr);
$end = new DateTime($endStr);
if ($start->format('Y-m-d') === $end->format('Y-m-d')) {
return [
$start->format('l j M Y'),
$start->format('g:i a') . ' - ' . $end->format('g:i a')
];
} else {
return [
$start->format('D j/m/Y') . ' - ' . $end->format('D j/m/Y')
];
}
} catch(\Exception $e) {
return ['Error parsing date'];
}
}
public static function matchesMimeType(string $mimeType, string|array $patterns): bool
{
if (is_string($patterns)) {
$patterns = [$patterns];
}
foreach ($patterns as $pattern) {
$pattern = str_replace('\*', '.*', preg_quote($pattern, '/'));
$regex = '/^' . $pattern . '$/';
if (preg_match($regex, $mimeType) === 1) {
return true;
}
}
return false;
}
public static function findMatchingMimeTypeKey(string $mimeType, array $patterns): string|bool
{
$match = '';
foreach ($patterns as $key => $value) {
$keys = explode(',', $key);
foreach($keys as $key) {
$pattern = str_replace('\*', '.*', preg_quote($key, '/'));
$regex = '/^' . $pattern . '$/';
if (preg_match($regex, $mimeType) === 1) {
if($match !== $mimeType) {
$match = $key;
}
}
}
}
if($match !== '') {
return $match;
}
return false;
}
public static function cleanFileName(string $name): string
{
$name = strtolower($name);
$name = mb_ereg_replace('/^\.+/', '', $name);
$name = mb_ereg_replace("([\s_])", '-', $name);
$name = mb_ereg_replace("([^\w\s\d\-_.])", '', $name);
$name = mb_ereg_replace("([\.]{2,})", '', $name);
$name = mb_ereg_replace("([\-]{2,})", '-', $name);
return $name;
}
public static function filenameToTitle(string $filename): string
{
$title = pathinfo($filename, PATHINFO_FILENAME);
$title = str_replace(['-', '_', '.'], ' ', $title);
$title = ucwords($title);
return $title;
}
}

View File

@@ -1,40 +0,0 @@
<?php
/* Array Helper Functions */
/**
* Remove an item from an array.
*
* @param array $arr The array to check.
* @param string|array $item The item or items to remove.
* @return array The filtered array.
*/
function arrayRemoveItem(array $arr, string|array $item): array
{
$filteredArr = $arr;
if (is_string($item) === true) {
$item = [$item];
}
foreach ($item as $str) {
$filteredArr = array_filter($arr, function ($item) use ($str) {
return $item !== $str;
});
}
return $filteredArr;
}
/**
* Return an array with specified the keys
*
* @param array $arr The array to filter.
* @param string|array $keys The keys to keep.
* @return array The filtered array.
*/
function arrayLimitKeys(array $arr, array $keys): array
{
return array_intersect_key($arr, array_flip($keys));
}

View File

@@ -1,19 +0,0 @@
<?php
/* Temp File Helper Functions */
/**
* Generate a temporary file path.
*
* @return str The filtered array.
*/
function generateTempFilePath(): string
{
$temporaryDir = storage_path('app/tmp');
if (is_dir($temporaryDir) === false) {
mkdir($temporaryDir, 0777, true);
}
return $temporaryDir . DIRECTORY_SEPARATOR . uniqid('upload_', true);
}

View File

@@ -0,0 +1,240 @@
<?php
namespace App\Http\Controllers;
use App\Helpers;
use App\Jobs\SendEmail;
use App\Mail\UserEmailUpdateRequest;
use App\Models\User;
use App\Providers\QRCodeProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use RobThree\Auth\Algorithm;
use RobThree\Auth\TwoFactorAuth;
class AccountController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Display the specified resource.
*/
public function show(User $user)
{
return view('account', compact('user'));
}
/**
* Show the form for editing the specified resource.
*/
public function edit(string $id)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request)
{
$user = auth()->user();
$validator = Validator::make($request->all(), [
'firstname' => 'required',
'surname' => 'required',
'email' => ['required', 'email', 'unique:users,email,' . $user->id],
'phone' => 'required',
'shipping_address' => 'required_with:shipping_city,shipping_postcode,shipping_country,shipping_state',
'shipping_city' => 'required_with:shipping_address,shipping_postcode,shipping_country,shipping_state',
'shipping_postcode' => 'required_with:shipping_address,shipping_city,shipping_country,shipping_state',
'shipping_country' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_state',
'shipping_state' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_country',
'billing_address' => 'required_with:billing_city,billing_postcode,billing_country,billing_state',
'billing_city' => 'required_with:billing_address,billing_postcode,billing_country,billing_state',
'billing_postcode' => 'required_with:billing_address,billing_city,billing_country,billing_state',
'billing_country' => 'required_with:billing_address,billing_city,billing_postcode,billing_state',
'billing_state' => 'required_with:billing_address,billing_city,billing_postcode,billing_country',
], [
'firstname.required' => __('validation.custom_messages.firstname_required'),
'surname.required' => __('validation.custom_messages.surname_required'),
'email.required' => __('validation.custom_messages.email_required'),
'email.email' => __('validation.custom_messages.email_invalid'),
'phone.required' => __('validation.custom_messages.phone_required'),
'shipping_address.required' => __('validation.custom_messages.shipping_address_required'),
'shipping_city.required' => __('validation.custom_messages.shipping_city_required'),
'shipping_postcode.required' => __('validation.custom_messages.shipping_postcode_required'),
'shipping_country.required' => __('validation.custom_messages.shipping_country_required'),
'shipping_state.required' => __('validation.custom_messages.shipping_state_required'),
'billing_address.required' => __('validation.custom_messages.billing_address_required'),
'billing_city.required' => __('validation.custom_messages.billing_city_required'),
'billing_postcode.required' => __('validation.custom_messages.billing_postcode_required'),
'billing_country.required' => __('validation.custom_messages.billing_country_required'),
'billing_state.required' => __('validation.custom_messages.billing_state_required'),
]);
if ($validator->fails()) {
return redirect()->back()->withErrors($validator)->withInput();
}
$userData = $request->all();
$newEmail = $userData['email'];
unset($userData['email']);
if (strtolower($user->email) !== strtolower($newEmail)) {
$user->tokens()->where('type', 'email-update')->delete();
$token = $user->tokens()->create([
'type' => 'email-update',
'data' => [
'email' => $newEmail,
],
'expires_at' => now()->addMinutes(30),
]);
dispatch(new SendEmail($user->email, new UserEmailUpdateRequest($token->id, $user->email, $newEmail)))->onQueue('mail');
}
$userData['subscribed'] = ($request->get('subscribed', false) === 'on');
$user->update($userData);
$user->save();
session()->flash('message', 'Your account details have been saved');
session()->flash('message-title', 'Details updated');
session()->flash('message-type', 'success');
return redirect()->back();
}
/**
* Remove the specified resource from storage.
*/
public function destroy()
{
/** @var User $user */
$user = auth()->user();
auth()->logout();
$user->delete();
session()->flash('message', 'Your account has been deleted');
session()->flash('message-title', 'Account Deleted');
session()->flash('message-type', 'success');
return redirect()->route('index');
}
public static function getTFAInstance()
{
$tfa = new TwoFactorAuth(new QRCodeProvider(), 'STEMMechanics', 6, 30, Algorithm::Sha512);
$tfa->ensureCorrectTime();
return $tfa;
}
public function show_tfa()
{
$user = auth()->user();
if ($user->tfa_secret === null) {
$tfa = self::getTFAInstance();
$secret = $tfa->createSecret();
return response()->json([
'secret' => $secret,
]);
} else {
abort(404);
}
}
public function show_tfa_image(Request $request)
{
$user = auth()->user();
if ($user->tfa_secret === null && $request->has('secret')) {
$tfa = self::getTFAInstance();
$qrCodeProvider = new QRCodeProvider();
$qrCode = $qrCodeProvider->getQRCodeImage(
$tfa->getQRText($user->email, $request->get('secret')),
200
);
return response()->stream(function () use ($qrCode) {
echo $qrCode;
}, 200, ['Content-Type' => $qrCodeProvider->getMimeType()]);
} else {
abort(404);
}
}
public function post_tfa(Request $request)
{
$user = auth()->user();
if ($user->tfa_secret === null && $request->has('secret') && $request->has('code')) {
$secret = $request->get('secret');
$code = $request->get('code');
$tfa = self::getTFAInstance();
if ($tfa->verifyCode($secret, $code, 4)) {
$user->tfa_secret = $secret;
$user->save();
$codes = $user->generateBackupCodes();
return response()->json([
'success' => true,
'codes' => $codes
]);
} else {
return response()->json([
'success' => false,
]);
}
} else {
abort(403);
}
}
public function destroy_tfa(Request $request)
{
$user = auth()->user();
if ($user->tfa_secret !== null) {
$user->tfa_secret = null;
$user->save();
$user->backupCodes()->delete();
return response()->json([
'success' => true,
]);
} else {
abort(403);
}
}
public function post_tfa_reset_backup_codes(Request $request)
{
$user = auth()->user();
if ($user->tfa_secret !== null) {
$codes = $user->generateBackupCodes();
return response()->json([
'success' => true,
'codes' => $codes
]);
} else {
abort(403);
}
}
}

View File

@@ -1,163 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\AnalyticsConductor;
use App\Conductors\Conductor;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\AnalyticsRequest;
use App\Models\Media;
use App\Models\Analytics;
use Illuminate\Http\JsonResponse;
use Carbon\Exceptions\InvalidFormatException;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Database\Eloquent\InvalidCastException;
use Illuminate\Database\Eloquent\MassAssignmentException;
use Illuminate\Http\Request;
class AnalyticsController extends ApiController
{
/**
* AnalyticsController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only([
'index',
'update',
'delete'
]);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
if ($request->user() !== null && $request->user()?->hasPermission('admin/analytics') === true) {
$searchFields = ['attribute', 'type', 'useragent', 'ip'];
$queryRequest = new Request();
$queryRequest->merge($request->only($searchFields));
foreach ($searchFields as $field) {
unset($request[$field]);
}
$query = Analytics::query()
->selectRaw('session,
MIN(created_at) as created_at,
TIMESTAMPDIFF(MINUTE, MIN(created_at), MAX(created_at)) as duration');
$query = Conductor::filterQuery($query, $queryRequest);
list($collection, $total) = AnalyticsConductor::collection($request, $query
->groupBy('session')
->get());
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}//end if
return $this->respondForbidden();
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Analytics $analytics The analyics model.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, int $session)
{
if ($request->user() !== null && $request->user()?->hasPermission('admin/analytics') === true) {
list($collection, $total) = AnalyticsConductor::collection($request, Analytics::query()
->where('session', $session)
->get());
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}
return $this->respondForbidden();
}
/**
* Store a newly created resource in storage.
*
* @param \App\Http\Requests\AnalyticsRequest $request The user request.
* @return \Illuminate\Http\Response
*/
public function store(AnalyticsRequest $request)
{
if (AnalyticsConductor::creatable() === true) {
$analytics = null;
$user = $request->user();
$data = [
'type' => $request->input('type'),
'attribute' => $request->input('attribute', ''),
'useragent' => $request->userAgent(),
'ip' => $request->ip()
];
if ($user !== null && $user->hasPermission('admin/analytics') === true && $request->has('session') === true) {
$data['session'] = $request->input('session');
$analytics = Analytics::create($data);
} else {
$analytics = Analytics::createWithSession($data);
}
return $this->respondAsResource(
AnalyticsConductor::model($request, $analytics),
['respondCode' => HttpResponseCodes::HTTP_CREATED]
);
} else {
return $this->respondForbidden();
}//end if
}
/**
* Update the specified resource in storage.
*
* @param \App\Http\Requests\AnalyticsRequest $request The analytics update request.
* @param \App\Models\Analytics $analytics The specified analytics.
* @return \Illuminate\Http\Response
*/
public function update(AnalyticsRequest $request, Analytics $analytics)
{
if (AnalyticsConductor::updatable($analytics) === true) {
$analytics->update($request->all());
return $this->respondAsResource(AnalyticsConductor::model($request, $analytics));
}
return $this->respondForbidden();
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Analytics $analytics The specified analytics.
* @return \Illuminate\Http\Response
*/
public function destroy(Analytics $analytics)
{
if (AnalyticsConductor::destroyable($analytics) === true) {
$analytics->delete();
return $this->respondNoContent();
} else {
return $this->respondForbidden();
}
}
}

View File

@@ -1,183 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\JsonResponse;
use App\Enum\HttpResponseCodes;
use App\Http\Controllers\Controller;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class ApiController extends Controller
{
/**
* Resource name
* @var string
*/
protected $resourceName = '';
/**
* Return generic json response with the given data.
*
* @param array $data Response data.
* @param integer $respondCode Response status code.
* @param array $headers Response headers.
*/
public function respondJson(array $data, int $respondCode = HttpResponseCodes::HTTP_OK, array $headers = []): JsonResponse
{
return response()->json($data, $respondCode, $headers);
}
/**
* Return forbidden message
*
* @param string $message Response message.
*/
public function respondForbidden(string $message = 'You do not have permission to access the resource.'): JsonResponse
{
return response()->json(['message' => $message], HttpResponseCodes::HTTP_FORBIDDEN);
}
/**
* Return forbidden message
*
* @param string $message Response message.
*/
public function respondNotFound(string $message = 'The resource was not found.'): JsonResponse
{
return response()->json(['message' => $message], HttpResponseCodes::HTTP_NOT_FOUND);
}
/**
* Return too large message
*
* @param string $message Response message.
*/
public function respondTooLarge(string $message = 'The request entity is too large.'): JsonResponse
{
return response()->json(['message' => $message], HttpResponseCodes::HTTP_REQUEST_ENTITY_TOO_LARGE);
}
/**
* Return no content
*/
public function respondNoContent(): JsonResponse
{
return response()->json([], HttpResponseCodes::HTTP_NO_CONTENT);
}
/**
* Return created
*/
public function respondCreated(): JsonResponse
{
return response()->json([], HttpResponseCodes::HTTP_CREATED);
}
/**
* Return accepted
*/
public function respondAccepted(): JsonResponse
{
return response()->json([], HttpResponseCodes::HTTP_ACCEPTED);
}
/**
* Return single error message
*
* @param string $message Error message.
* @param integer $responseCode Resource code.
*/
public function respondError(string $message, int $responseCode = HttpResponseCodes::HTTP_UNPROCESSABLE_ENTITY): JsonResponse
{
return response()->json([
'message' => $message
], $responseCode);
}
/**
* Return formatted errors
*
* @param array $errors Error messages.
* @param integer $responseCode Resource code.
*/
public function respondWithErrors(array $errors, int $responseCode = HttpResponseCodes::HTTP_UNPROCESSABLE_ENTITY): JsonResponse
{
$keys = array_keys($errors);
$error = $errors[$keys[0]];
if (count($keys) > 1) {
$additional_errors = (count($keys) - 1);
$error .= sprintf(' (and %d more %s', $additional_errors, Str::plural('error', $additional_errors));
}
return response()->json([
'message' => $error,
'errors' => $errors
], $responseCode);
}
/**
* Return resource data
*
* @param array|Model|Collection $data Resource data.
* @param array $options Respond options.
*/
protected function respondAsResource(
mixed $data,
array $options = [],
$validationFn = null
): JsonResponse {
$isCollection = $options['isCollection'] ?? false;
$appendData = $options['appendData'] ?? null;
$resourceName = $options['resourceName'] ?? null;
$respondCode = ($options['respondCode'] ?? HttpResponseCodes::HTTP_OK);
if ($data === null || ($data instanceof Collection && $data->count() === 0)) {
$validationData = [];
if (array_key_exists('appendData', $options) === true) {
$validationData = $options['appendData'];
}
if ($validationFn === null || $validationFn($validationData) === true) {
return $this->respondNotFound();
}
}
if (is_null($resourceName) === true || empty($resourceName) === true) {
$resourceName = $this->resourceName;
}
if (is_null($resourceName) === true || empty($resourceName) === true) {
$resourceName = get_class($this);
$resourceName = substr($resourceName, (strrpos($resourceName, '\\') + 1));
$resourceName = substr($resourceName, 0, strpos($resourceName, 'Controller'));
$resourceName = strtolower($resourceName);
}
$dataArray = [];
if ($data instanceof Collection) {
$dataArray = $data->toArray();
} elseif (is_array($data) === true) {
$dataArray = $data;
} elseif ($data instanceof Model) {
$is_multiple = false;
$dataArray = $data->toArray();
}
$resource = [];
if ($isCollection === true) {
$resource = [Str::plural($resourceName) => $dataArray];
} else {
$resource = [Str::singular($resourceName) => $dataArray];
}
if ($appendData !== null) {
$resource += $appendData;
}
return response()->json($resource, $respondCode);
}
}

View File

@@ -1,245 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\MediaConductor;
use App\Conductors\ArticleConductor;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\ArticleRequest;
use App\Models\Media;
use App\Models\Article;
use Illuminate\Http\JsonResponse;
use Carbon\Exceptions\InvalidFormatException;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Database\Eloquent\InvalidCastException;
use Illuminate\Database\Eloquent\MassAssignmentException;
use Illuminate\Http\Request;
class ArticleController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only([
'store',
'update',
'delete'
]);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = ArticleConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Article $article The article model.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Article $article)
{
if (ArticleConductor::viewable($article) === true) {
return $this->respondAsResource(ArticleConductor::model($request, $article));
}
return $this->respondForbidden();
}
/**
* Store a newly created resource in storage.
*
* @param \App\Http\Requests\ArticleRequest $request The user request.
* @return \Illuminate\Http\Response
*/
public function store(ArticleRequest $request)
{
if (ArticleConductor::creatable() === true) {
$article = Article::create($request->all());
return $this->respondAsResource(
ArticleConductor::model($request, $article),
['respondCode' => HttpResponseCodes::HTTP_CREATED]
);
} else {
return $this->respondForbidden();
}
}
/**
* Update the specified resource in storage.
*
* @param \App\Http\Requests\ArticleRequest $request The article update request.
* @param \App\Models\Article $article The specified article.
* @return \Illuminate\Http\Response
*/
public function update(ArticleRequest $request, Article $article)
{
if (ArticleConductor::updatable($article) === true) {
$article->update($request->all());
return $this->respondAsResource(ArticleConductor::model($request, $article));
}
return $this->respondForbidden();
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Article $article The specified article.
* @return \Illuminate\Http\Response
*/
public function destroy(Article $article)
{
if (ArticleConductor::destroyable($article) === true) {
$article->delete();
return $this->respondNoContent();
} else {
return $this->respondForbidden();
}
}
/**
* Get a list of attachments related to this model.
*
* @param Request $request The user request.
* @param Article $article The article model.
* @return JsonResponse Returns the article attachments.
* @throws InvalidFormatException
* @throws BindingResolutionException
* @throws InvalidCastException
*/
public function getAttachments(Request $request, Article $article): JsonResponse
{
if (ArticleConductor::viewable($article) === true) {
$medium = $article->attachments->map(function ($attachment) {
return $attachment->media;
});
return $this->respondAsResource(MediaConductor::collection($request, $medium), ['isCollection' => true, 'resourceName' => 'attachment']);
}
return $this->respondForbidden();
}
/**
* Store an attachment related to this model.
*
* @param Request $request The user request.
* @param Article $article The article model.
* @return JsonResponse The response.
* @throws BindingResolutionException
* @throws MassAssignmentException
*/
public function storeAttachment(Request $request, Article $article): JsonResponse
{
if (ArticleConductor::updatable($article) === true) {
if ($request->has("medium") && Media::find($request->medium)) {
$article->attachments()->create(['media_id' => $request->medium]);
return $this->respondCreated();
}
return $this->respondWithErrors(['media' => 'The media ID was not found']);
}
return $this->respondForbidden();
}
/**
* Update/replace attachments related to this model.
*
* @param Request $request The user request.
* @param Article $article The related model.
* @throws BindingResolutionException
* @throws MassAssignmentException
*/
public function updateAttachments(Request $request, Article $article): JsonResponse
{
if (ArticleConductor::updatable($article) === true) {
$mediaIds = $request->attachments;
if (is_array($mediaIds) === false) {
$mediaIds = explode(',', $request->attachments);
}
$mediaIds = array_map('trim', $mediaIds); // trim each media ID
$attachments = $article->attachments;
// Delete attachments that are not in $mediaIds
foreach ($attachments as $attachment) {
if (!in_array($attachment->media_id, $mediaIds)) {
$attachment->delete();
}
}
// Create new attachments for media IDs that are not already in $article->attachments()
foreach ($mediaIds as $mediaId) {
$found = false;
foreach ($attachments as $attachment) {
if ($attachment->media_id == $mediaId) {
$found = true;
break;
}
}
if (!$found) {
$article->attachments()->create(['media_id' => $mediaId]);
}
}
return $this->respondNoContent();
}//end if
return $this->respondForbidden();
}
/**
* Delete a specific related attachment.
* @param Request $request The user request.
* @param Article $article The model.
* @param Media $medium The attachment medium.
* @throws BindingResolutionException
*/
public function deleteAttachment(Request $request, Article $article, Media $medium): JsonResponse
{
if (ArticleConductor::updatable($article) === true) {
$attachments = $article->attachments;
$deleted = false;
foreach ($attachments as $attachment) {
if ($attachment->media_id === $medium->id) {
$attachment->delete();
$deleted = true;
break;
}
}
if ($deleted) {
// Attachment was deleted successfully
return $this->respondNoContent();
} else {
// Attachment with matching media ID was not found
return $this->respondNotFound();
}
}
return $this->respondForbidden();
}
}

View File

@@ -1,84 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Models\Attachment;
use Illuminate\Http\Request;
class AttachmentController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->except(['store', 'destroyByEmail']);
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param \App\Models\Attachment $attachment
* @return \Illuminate\Http\Response
*/
public function show(Attachment $attachment)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Attachment $attachment
* @return \Illuminate\Http\Response
*/
public function edit(Attachment $attachment)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Attachment $attachment
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Attachment $attachment)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Attachment $attachment
* @return \Illuminate\Http\Response
*/
public function destroy(Attachment $attachment)
{
//
}
}

View File

@@ -1,99 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\AuthLoginRequest;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Http\JsonResponse;
class AuthController extends ApiController
{
/**
* Resource name
* @var string
*/
protected $resourceName = 'user';
/**
* ApplicationController constructor.
*/
public function __construct()
{
// $this->middleware('auth:sanctum')
// ->only(['me']);
}
/**
* Current User details
*
* @param Request $request Current request data.
*/
public function me(Request $request): JsonResponse
{
$user = $request->user()->makeVisible(['permissions']);
return $this->respondAsResource($user);
}
/**
* Login user with supplied creditials
*
* @param App\Http\Controllers\Api\AuthLoginRequest $request Created request data.
* @return JsonResponse|void
*/
public function login(AuthLoginRequest $request)
{
$user = User::where('email', '=', $request->input('email'))->first();
if ($user !== null && strlen($user->password) > 0 && Hash::check($request->input('password'), $user->password) === true) {
if ($user->email_verified_at === null) {
return $this->respondWithErrors([
'email' => 'Email address has not been verified.'
]);
}
if ($user->disabled === true) {
return $this->respondWithErrors([
'email' => 'Account has been disabled.'
]);
}
$token = $user->createToken('user_token')->plainTextToken;
$user->logins()->create([
'token' => $token,
'login' => now(),
'ip_address' => $request->ip(),
'user_agent' => $request->userAgent()
]);
return $this->respondAsResource(
$user->makeVisible(['permissions']),
['appendData' => ['token' => $token]]
);
}//end if
return $this->respondWithErrors([
'email' => 'Invalid email or password',
'password' => 'Invalid email or password',
]);
}
/**
* Logout current user
*
* @param Request $request Current request data.
*/
public function logout(Request $request): JsonResponse
{
$user = $request->user();
$user->logins()->where('token', $user->currentAccessToken())->update(['logout' => now()]);
$user->currentAccessToken()->delete();
return $this->respondNoContent();
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Requests\ContactSendRequest;
use App\Jobs\SendEmailJob;
use App\Mail\Contact;
class ContactController extends ApiController
{
/**
* Send the request to the site admin by email
*
* @param \App\Http\Requests\User\ContactSendRequest $request Request data.
* @return \Illuminate\Http\Response
*/
public function send(ContactSendRequest $request)
{
dispatch((new SendEmailJob(
config('contact.contact_address'),
new Contact(
$request->input('name'),
$request->input('email'),
$request->input('content')
)
)))->onQueue('mail');
return $this->respondCreated();
}
}

View File

@@ -1,309 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Enum\HttpResponseCodes;
use App\Models\Event;
use App\Conductors\EventConductor;
use App\Conductors\MediaConductor;
use App\Conductors\UserConductor;
use App\Http\Requests\EventRequest;
use App\Models\Media;
use App\Models\User;
use Illuminate\Http\Request;
class EventController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only(['store','update','destroy', 'userAdd', 'userUpdate', 'userDelete']);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = EventConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Event $event The specified event.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Event $event)
{
if (EventConductor::viewable($event) === true) {
return $this->respondAsResource(EventConductor::model($request, $event));
}
return $this->respondForbidden();
}
/**
* Store a newly created resource in storage.
*
* @param \App\Http\Requests\EventRequest $request The request.
* @return \Illuminate\Http\Response
*/
public function store(EventRequest $request)
{
if (EventConductor::creatable() === true) {
$event = Event::create($request->all());
return $this->respondAsResource(
EventConductor::model($request, $event),
['respondCode' => HttpResponseCodes::HTTP_CREATED]
);
} else {
return $this->respondForbidden();
}
}
/**
* Update the specified resource in storage.
*
* @param \App\Http\Requests\EventRequest $request The endpoint request.
* @param \App\Models\Event $event The specified event.
* @return \Illuminate\Http\Response
*/
public function update(EventRequest $request, Event $event)
{
if (EventConductor::updatable($event) === true) {
$event->update($request->all());
return $this->respondAsResource(EventConductor::model($request, $event));
}
return $this->respondForbidden();
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Event $event The specified event.
* @return \Illuminate\Http\Response
*/
public function destroy(Event $event)
{
if (EventConductor::destroyable($event) === true) {
$event->delete();
return $this->respondNoContent();
} else {
return $this->respondForbidden();
}
}
/**
* Get a list of attachments related to this model.
*
* @param Request $request The user request.
* @param Event $event The event model.
* @return JsonResponse Returns the event attachments.
*/
public function getAttachments(Request $request, Event $event): JsonResponse
{
if (EventConductor::viewable($event) === true) {
$medium = $event->attachments->map(function ($attachment) {
return $attachment->media;
});
return $this->respondAsResource(MediaConductor::collection($request, $medium), ['isCollection' => true, 'resourceName' => 'attachment']);
}
return $this->respondForbidden();
}
/**
* Store an attachment related to this model.
*
* @param Request $request The user request.
* @param Event $event The event model.
* @return JsonResponse The response.
*/
public function storeAttachment(Request $request, Event $event): JsonResponse
{
if (EventConductor::updatable($event) === true) {
if ($request->has("medium") === true && Media::find($request->medium) !== null) {
$event->attachments()->create(['media_id' => $request->medium]);
return $this->respondCreated();
}
return $this->respondWithErrors(['media' => 'The media ID was not found']);
}
return $this->respondForbidden();
}
/**
* Update/replace attachments related to this model.
*
* @param Request $request The user request.
* @param Event $event The related model.
*/
public function updateAttachments(Request $request, Event $event): JsonResponse
{
if (EventConductor::updatable($event) === true) {
$mediaIds = $request->attachments;
if (is_array($mediaIds) === false) {
$mediaIds = explode(',', $request->attachments);
}
$mediaIds = array_map('trim', $mediaIds); // trim each media ID
$attachments = $event->attachments;
// Delete attachments that are not in $mediaIds
foreach ($attachments as $attachment) {
if (in_array($attachment->media_id, $mediaIds) === false) {
$attachment->delete();
}
}
// Create new attachments for media IDs that are not already in $article->attachments()
foreach ($mediaIds as $mediaId) {
$found = false;
foreach ($attachments as $attachment) {
if ($attachment->media_id === $mediaId) {
$found = true;
break;
}
}
if ($found === false) {
$event->attachments()->create(['media_id' => $mediaId]);
}
}
return $this->respondNoContent();
}//end if
return $this->respondForbidden();
}
/**
* Delete a specific related attachment.
*
* @param Request $request The user request.
* @param Event $event The model.
* @param Media $medium The attachment medium.
*/
public function deleteAttachment(Request $request, Event $event, Media $medium): JsonResponse
{
if (EventConductor::updatable($event) === true) {
$attachments = $event->attachments;
$deleted = false;
foreach ($attachments as $attachment) {
if ($attachment->media_id === $medium->id) {
$attachment->delete();
$deleted = true;
break;
}
}
if ($deleted === true) {
// Attachment was deleted successfully
return $this->respondNoContent();
} else {
// Attachment with matching media ID was not found
return $this->respondNotFound();
}
}
return $this->respondForbidden();
}
public function userList(Request $request, Event $event)
{
$authUser = $request->user();
$eventUsers = $event->users;
if ($authUser !== null) {
$isAdmin = $authUser->hasPermission('admin/events');
$isEventUser = $eventUsers->contains($authUser->id);
if ($isAdmin === true || $isEventUser === true) {
if ($isAdmin === false) {
$eventUsers = $eventUsers->filter(function ($user) use ($authUser) {
return $user->id === $authUser->id;
});
}
return $this->respondAsResource(UserConductor::collection($request, $eventUsers), ['isCollection' => true, 'resourceName' => 'users']);
}
return $this->respondNotFound();
}
return $this->respondForbidden();
}
public function userAdd(Request $request, Event $event)
{
$authUser = $request->user();
if ($authUser !== null && $authUser->hasPermission('admin/events') === true) {
if ($request->has("users") === true) {
$eventUsers = $event->users()->pluck('user_id')->toArray(); // Get the current users in the event
$requestedUsers = $request->input("users"); // Get the requested users
$usersToAdd = array_diff($requestedUsers, $eventUsers); // Users to add
$usersToRemove = array_diff($eventUsers, $requestedUsers); // Users to remove
// Add missing users
foreach ($usersToAdd as $userToAdd) {
if (User::find($userToAdd) !== null) {
$event->users()->attach($userToAdd);
}
}
// Remove extra users
foreach ($usersToRemove as $userToRemove) {
$event->users()->detach($userToRemove);
}
return $this->respondNoContent();
}//end if
return $this->respondWithErrors(['users' => 'The user list was not found']);
}//end if
return $this->respondForbidden();
}
public function userUpdate(Request $request, Event $event)
{
// only admin/events permitted
}
public function userDelete(Request $request, Event $event, User $user)
{
$authUser = $request->user();
if ($authUser !== null && $authUser->hasPermission('admin/events') === true) {
$eventUsers = $event->users;
if ($eventUsers->find($user->id) !== null) {
$eventUsers->detach($user->id);
return $this->respondNoContent();
} else {
return $this->respondNotFound();
}
}
return $this->respondForbidden();
}
}

View File

@@ -1,126 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
class LogController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only(['show']);
}
/**
* Display the specified resource.
*
* @param Request $request The log request.
* @param string $name The log name.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, string $name)
{
if ($request->user()?->hasPermission('logs/' . $name) === true) {
switch (strtolower($name)) {
case 'discord':
$data = [];
$log = $request->get('log');
if ($log === null) {
$log = ['output', 'error'];
} else {
$log = explode(',', strtolower($log));
}
$lines = intval($request->get('lines', 50));
if ($lines > 100) {
$lines = 100;
} elseif ($lines < 0) {
$lines = 1;
}
$before = $request->get('before');
if ($before !== null) {
$before = preg_split("/([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/", $before, -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
if (count($before) !== 6) {
$before = null;
}
}
$after = $request->get('after');
if ($after !== null) {
$after = preg_split("/([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/", $after, -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
if (count($after) !== 6) {
$after = null;
}
}
$logFiles = [
[
'name' => 'output',
'path' => '/home/discordbot/.pm2/logs/stemmech-discordbot-out-0.log'
],[
'name' => 'error',
'path' => '/home/discordbot/.pm2/logs/stemmech-discordbot-error-0.log'
]
];
foreach ($logFiles as $logFile) {
if (in_array($logFile['name'], $log) === true) {
$logContent = '';
if (file_exists($logFile['path']) === true) {
$logContent = file_get_contents($logFile['path']);
}
$logArray = preg_split("/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}: (?:(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}: )[\s\S])*)/", $logContent, -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
$logContent = '';
$logLineCount = 0;
$logLineSkip = false;
foreach (array_reverse($logArray) as $logLine) {
$lineDate = preg_split("/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}): /", $logLine, -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
if (count($lineDate) >= 6) {
$logLineSkip = false;
// Is line before
if ($before !== null && ($lineDate[0] > $before[0] || $lineDate[1] > $before[1] || $lineDate[2] > $before[2] || $lineDate[3] > $before[3] || $lineDate[4] > $before[4] || $lineDate[5] > $before[5])) {
$logLineSkip = true;
continue;
}
// Is line after
if ($after !== null && ($after[0] > $lineDate[0] || $after[1] > $lineDate[1] || $after[2] > $lineDate[2] || $after[3] > $lineDate[3] || $after[4] > $lineDate[4] || $after[5] > $lineDate[5])) {
$logLineSkip = true;
continue;
}
$logLineCount += 1;
}
if ($logLineCount > $lines) {
break;
}
if ($logLineSkip === false) {
$logContent .= $logLine;
}
}//end foreach
$data[$logFile['name']] = $logContent;
}//end if
}//end foreach
return $this->respondJson([
'log' => $data
]);
}//end switch
}//end if
return $this->respondForbidden();
}
}

View File

@@ -1,254 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\MediaConductor;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\MediaRequest;
use App\Models\Media;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
use Laravel\Sanctum\PersonalAccessToken;
class MediaController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only(['store','update','destroy']);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = MediaConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
],
function ($options) {
return $options['total'] === 0;
}
);
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Media $medium The request media.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Media $medium)
{
if (MediaConductor::viewable($medium) === true) {
return $this->respondAsResource(MediaConductor::model($request, $medium));
}
return $this->respondForbidden();
}
/**
* Store a new media resource
*
* @param \App\Http\Requests\MediaRequest $request The uploaded media.
* @return \Illuminate\Http\Response
*/
public function store(MediaRequest $request)
{
if (MediaConductor::creatable() === true) {
$file = $request->file('file');
if ($file === null) {
return $this->respondWithErrors(['file' => 'The browser did not upload the file correctly to the server.']);
}
if ($file->isValid() !== true) {
switch ($file->getError()) {
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
return $this->respondTooLarge();
case UPLOAD_ERR_PARTIAL:
return $this->respondWithErrors(['file' => 'The file upload was interrupted.']);
default:
return $this->respondWithErrors(['file' => 'An error occurred uploading the file to the server.']);
}
}
if ($file->getSize() > Media::getMaxUploadSize()) {
return $this->respondTooLarge();
}
try {
$media = Media::createFromUploadedFile($request, $file);
} catch (\Exception $e) {
if ($e->getCode() === Media::FILE_SIZE_EXCEEDED_ERROR) {
return $this->respondTooLarge();
} else {
return $this->respondWithErrors(['file' => $e->getMessage()]);
}
}
return $this->respondAsResource(
MediaConductor::model($request, $media),
['respondCode' => HttpResponseCodes::HTTP_ACCEPTED]
);
}//end if
return $this->respondForbidden();
}
/**
* Update the media resource in storage.
*
* @param \App\Http\Requests\MediaRequest $request The update request.
* @param \App\Models\Media $medium The specified media.
* @return \Illuminate\Http\Response
*/
public function update(MediaRequest $request, Media $medium)
{
if (MediaConductor::updatable($medium) === true) {
$file = $request->file('file');
if ($file !== null) {
if ($file->isValid() !== true) {
switch ($file->getError()) {
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
return $this->respondTooLarge();
case UPLOAD_ERR_PARTIAL:
return $this->respondWithErrors(['file' => 'The file upload was interrupted.']);
default:
return $this->respondWithErrors(['file' => 'An error occurred uploading the file to the server.']);
}
}
if ($file->getSize() > Media::getMaxUploadSize()) {
return $this->respondTooLarge();
}
}
$medium->update($request->all());
if ($file !== null) {
try {
$medium->updateWithUploadedFile($file);
} catch (\Exception $e) {
return $this->respondWithErrors(
['file' => $e->getMessage()],
HttpResponseCodes::HTTP_INTERNAL_SERVER_ERROR
);
}
}
return $this->respondAsResource(MediaConductor::model($request, $medium));
}//end if
return $this->respondForbidden();
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Media $medium Specified media file.
* @return \Illuminate\Http\Response
*/
public function destroy(Media $medium)
{
if (MediaConductor::destroyable($medium) === true) {
$medium->delete();
return $this->respondNoContent();
}
return $this->respondForbidden();
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Media $medium Specified media.
* @return \Illuminate\Http\Response
*/
public function download(Request $request, Media $medium)
{
$respondJson = in_array('application/json', explode(',', $request->header('Accept', 'application/json')));
$headers = [];
$path = $medium->path();
/* File exists */
if (file_exists($path) === false) {
if ($respondJson === false) {
return redirect('/not-found');
} else {
return $this->respondNotFound();
}
}
$updated_at = Carbon::parse(filemtime($path));
$headerPragma = 'no-cache';
$headerCacheControl = 'max-age=0, must-revalidate';
$headerExpires = $updated_at->toRfc2822String();
if (empty($medium->permission) === true) {
if ($request->user() === null && $request->has('token') === true) {
$accessToken = PersonalAccessToken::findToken(urldecode($request->input('token')));
if (
$accessToken !== null && (config('sanctum.expiration') === null ||
$accessToken->created_at->lte(now()->subMinutes(config('sanctum.expiration'))) === false)
) {
$user = $accessToken->tokenable;
}
}
if ($request->user() === null || $user->hasPermission($medium->permission) === false) {
if ($respondJson === false) {
return redirect('/login?redirect=' . $request->path());
} else {
return $this->respondForbidden();
}
}
} else {
$headerPragma = 'public';
$headerExpires = $updated_at->addMonth()->toRfc2822String();
}//end if
// deepcode ignore InsecureHash: Browsers expect Etag to be a md5 hash
$headerEtag = md5($updated_at->format('U'));
$headerLastModified = $updated_at->toRfc2822String();
$headers = [
'Cache-Control' => $headerCacheControl,
'Content-Disposition' => sprintf('inline; filename="%s"', basename($path)),
'Etag' => $headerEtag,
'Expires' => $headerExpires,
'Last-Modified' => $headerLastModified,
'Pragma' => $headerPragma,
];
$server = request()->server;
$requestModifiedSince = $server->has('HTTP_IF_MODIFIED_SINCE') &&
$server->get('HTTP_IF_MODIFIED_SINCE') === $headerLastModified;
$requestNoneMatch = $server->has('HTTP_IF_NONE_MATCH') &&
$server->get('HTTP_IF_NONE_MATCH') === $headerEtag;
if ($requestModifiedSince === true || $requestNoneMatch === true) {
return response()->make('', 304, $headers);
}
return response()->file($path, $headers);
}
}

View File

@@ -1,231 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use thiagoalessio\TesseractOCR\TesseractOCR;
use FFMpeg;
use App\Enum\CurlErrorCodes;
class OCRController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
// $this->middleware('auth:sanctum')
// ->only(['show']);
}
/**
* Display the specified resource.
*
* @param Request $request The log request.
* @return \Illuminate\Http\Response
*/
public function show(Request $request)
{
// if ($request->user()?->hasPermission('logs/' . $name) === true) {
$url = $request->get('url');
if ($url !== null) {
$data = ['ocr' => []];
$filters = $request->get('filters', ['tesseract']);
if (is_array($filters) === false) {
$filters = explode(',', $filters);
}
$tesseractOEM = $request->get('tesseract.oem');
$tesseractDigits = $request->get('tesseract.digits');
$tesseractAllowlist = $request->get('tesseract.allowlist');
// Download URL
$urlDownloadFilePath = tempnam(sys_get_temp_dir(), 'download');
$maxDownloadSize = (1024 * 1024); // 1MB
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// We need progress updates to break the connection mid-way
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128); // more progress info
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function (
$downloadSize,
$downloaded,
$uploadSize,
$uploaded
) use ($maxDownloadSize) {
return ($downloaded > $maxDownloadSize) ? 1 : 0;
});
$curlResult = curl_exec($ch);
$curlError = curl_errno($ch);
$curlSize = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
curl_close($ch);
if ($curlError !== 0) {
$error = 'File size is larger then allowed';
if ($curlError !== CurlErrorCodes::CURLE_ABORTED_BY_CALLBACK) {
$error = CurlErrorCodes::getMessage($curlError);
}
return $this->respondWithErrors(['url' => $error]);
}
// Save url file
file_put_contents($urlDownloadFilePath, $curlResult);
$urlDownloadFilePathBase = preg_replace('/\\.[^.\\s]{3,4}$/', '', $urlDownloadFilePath);
// tesseract (overall)
$ocr = null;
foreach ($filters as $filterItem) {
if (str_starts_with($filterItem, 'tesseract') === true) {
$ocr = new TesseractOCR();
$ocr->image($urlDownloadFilePath);
if ($tesseractOEM !== null) {
$ocr->oem($tesseractOEM);
}
if ($tesseractDigits !== null) {
$ocr->digits();
}
if ($tesseractAllowlist !== null) {
$ocr->allowlist($tesseractAllowlist);
}
break;
}
}
// Image Filter Function
$tesseractImageFilterFunc = function ($filter, $options = null) use ($curlResult, $curlSize, $ocr) {
$result = '';
$img = imagecreatefromstring($curlResult);
if ($img !== false && (($options !== null && imagefilter($img, $filter, $options) === true) || ($options === null && imagefilter($img, $filter) === true))) {
ob_start();
imagepng($img);
$imgData = ob_get_contents();
ob_end_clean();
$imgDataSize = strlen($imgData);
$ocr->imageData($imgData, $imgDataSize);
imagedestroy($img);
$result = $ocr->run(500);
}
return $result;
};
// Image Scale Function
$tesseractImageScaleFunc = function ($scaleFunc) use ($curlResult, $ocr) {
$result = '';
$srcImage = imagecreatefromstring($curlResult);
$srcWidth = imagesx($srcImage);
$srcHeight = imagesy($srcImage);
$dstWidth = $scaleFunc($srcWidth);
$dstHeight = $scaleFunc($srcHeight);
$dstImage = imagecreatetruecolor($dstWidth, $dstHeight);
imagecopyresampled($dstImage, $srcImage, 0, 0, 0, 0, $dstWidth, $dstHeight, $srcWidth, $srcHeight);
ob_start();
imagepng($dstImage);
$imgData = ob_get_contents();
ob_end_clean();
$imgDataSize = strlen($imgData);
imagedestroy($srcImage);
imagedestroy($dstImage);
$ocr->imageData($imgData, $imgDataSize);
$result = $ocr->run(500);
return $result;
};
// filter: tesseract
if (in_array('tesseract', $filters) === true) {
$data['ocr']['tesseract'] = $ocr->run(500);
}
// filter: tesseract.grayscale
if (in_array('tesseract.grayscale', $filters) === true) {
$data['ocr']['tesseract.grayscale'] = $tesseractImageFilterFunc(IMG_FILTER_GRAYSCALE);
}
// filter: tesseract.double_scale
if (in_array('tesseract.double_scale', $filters) === true) {
$data['ocr']['tesseract.double_scale'] = $tesseractImageScaleFunc(function ($size) {
return $size * 2;
});
}
// filter: tesseract.half_scale
if (in_array('tesseract.half_scale', $filters) === true) {
$data['ocr']['tesseract.half_scale'] = $tesseractImageScaleFunc(function ($size) {
return $size / 2;
});
}
// filter: tesseract.edgedetect
if (in_array('tesseract.edgedetect', $filters) === true) {
$data['ocr']['tesseract.edgedetect'] = $tesseractImageFilterFunc(IMG_FILTER_EDGEDETECT);
}
// filter: tesseract.mean_removal
if (in_array('tesseract.mean_removal', $filters) === true) {
$data['ocr']['tesseract.mean_removal'] = $tesseractImageFilterFunc(IMG_FILTER_MEAN_REMOVAL);
}
// filter: tesseract.negate
if (in_array('tesseract.negate', $filters) === true) {
$data['ocr']['tesseract.negate'] = $tesseractImageFilterFunc(IMG_FILTER_NEGATE);
}
// filter: tesseract.pixelate
if (in_array('tesseract.pixelate', $filters) === true) {
$data['ocr']['tesseract.pixelate'] = $tesseractImageFilterFunc(IMG_FILTER_PIXELATE, 3);
}
// filter: keras
if (in_array('keras', $filters) === true) {
$cmd = '/usr/bin/python3 ' . base_path() . '/scripts/keras_oc.py ' . urlencode($url);
$command = escapeshellcmd($cmd);
$output = shell_exec($cmd);
if ($output !== null && strlen($output) > 0) {
$output = substr($output, (strpos($output, '----------START----------') + 25));
} else {
$output = '';
}
$data['ocr']['keras'] = $output;
}
unlink($urlDownloadFilePath);
return $this->respondJson($data);
}//end if
return $this->respondWithErrors(['url' => 'url is missing']);
}
// $ffmpeg = FFMpeg\FFMpeg::create();
// // Load the input video
// $inputFile = $ffmpeg->open('input.mp4');
// // Split the video into individual frames
// $videoFrames = $inputFile->frames();
// foreach ($videoFrames as $frame) {
// // Save the frame as a PNG
// $frame->save(new FFMpeg\Format\Video\PNG(), 'frame-' . $frame->getMetadata('pts') . '.png');
// // Pass the PNG to Tesseract for processing
// exec("tesseract frame-" . $frame->getMetadata('pts') . ".png output");
// }
// // Read the output from Tesseract
// $text = file_get_contents("output.txt");
// // Do something with the text from Tesseract
// echo $text;
}

View File

@@ -1,117 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\MediaConductor;
use App\Conductors\ShortlinkConductor;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\MediaRequest;
use App\Http\Requests\ShortlinkRequest;
use App\Models\Media;
use App\Models\Shortlink;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
use Laravel\Sanctum\PersonalAccessToken;
class ShortlinkController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->only(['store','update','destroy']);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = ShortlinkConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
],
function ($options) {
return $options['total'] === 0;
}
);
}
/**
* Display the specified resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Shortlink $shortlink The request shortlink.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Shortlink $shortlink)
{
if (ShortlinkConductor::viewable($shortlink) === true) {
return $this->respondAsResource(ShortlinkConductor::model($request, $shortlink));
}
return $this->respondForbidden();
}
/**
* Store a new media resource
*
* @param \App\Http\Requests\ShortlinkRequest $request The shortlink.
* @return \Illuminate\Http\Response
*/
public function store(ShortlinkRequest $request)
{
if (ShortlinkConductor::creatable() === true) {
$shortlink = Shortlink::create($request->all());
return $this->respondAsResource(
ShortlinkConductor::model($request, $shortlink),
['respondCode' => HttpResponseCodes::HTTP_ACCEPTED]
);
}//end if
return $this->respondForbidden();
}
/**
* Update the media resource in storage.
*
* @param \App\Http\Requests\ShortlinkRequest $request The update request.
* @param \App\Models\Shortlink $medium The specified shortlink.
* @return \Illuminate\Http\Response
*/
public function update(ShortlinkRequest $request, Shortlink $shortlink)
{
if (ShortlinkConductor::updatable($shortlink) === true) {
$shortlink->update($request->all());
return $this->respondAsResource(ShortlinkConductor::model($request, $shortlink));
}//end if
return $this->respondForbidden();
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Shortlink $medium Specified shortlink.
* @return \Illuminate\Http\Response
*/
public function destroy(Shortlink $shortlink)
{
if (ShortlinkConductor::destroyable($shortlink) === true) {
$shortlink->delete();
return $this->respondNoContent();
}
return $this->respondForbidden();
}
}

View File

@@ -1,146 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\SubscriptionConductor;
use App\Enum\HttpResponseCodes;
use App\Models\Subscription;
use App\Http\Requests\SubscriptionRequest;
use App\Jobs\SendEmailJob;
use App\Mail\SubscriptionConfirm;
use App\Mail\SubscriptionUnsubscribed;
use Illuminate\Http\Request;
class SubscriptionController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->except(['store', 'destroyByEmail']);
}
/**
* Display a listing of subscribers.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = SubscriptionConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}
/**
* Display the specified user.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\Subscription $subscription The subscription model.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Subscription $subscription)
{
if (SubscriptionConductor::viewable($subscription) === true) {
return $this->respondAsResource(SubscriptionConductor::model($request, $subscription));
}
return $this->respondForbidden();
}
/**
* Store a subscriber email in the database.
*
* @param \App\Http\Requests\SubscriptionRequest $request The subscriber update request.
* @return \Illuminate\Http\Response
*/
public function store(SubscriptionRequest $request)
{
if (SubscriptionConductor::creatable() === true) {
Subscription::create($request->all());
dispatch((new SendEmailJob($request->email, new SubscriptionConfirm($request->email))))->onQueue('mail');
return $this->respondCreated();
} else {
return $this->respondForbidden();
}
}
/**
* Update the specified resource in storage.
*
* @param \App\Http\Requests\SubscriptionRequest $request The subscription update request.
* @param \App\Models\Subscription $subscription The specified subscription.
* @return \Illuminate\Http\Response
*/
public function update(SubscriptionRequest $request, Subscription $subscription)
{
// if (EventConductor::updatable($event) === true) {
// $event->update($request->all());
// return $this->respondAsResource(EventConductor::model($request, $event));
// }
// return $this->respondForbidden();
// $input = [];
// $updatable = ['username', 'first_name', 'last_name', 'email', 'phone', 'password'];
// if ($request->user()->hasPermission('admin/user') === true) {
// $updatable = array_merge($updatable, ['email_verified_at']);
// } elseif ($request->user()->is($user) !== true) {
// return $this->respondForbidden();
// }
// $input = $request->only($updatable);
// if (array_key_exists('password', $input) === true) {
// $input['password'] = Hash::make($request->input('password'));
// }
// $user->update($input);
// return $this->respondAsResource((new UserFilter($request))->filter($user));
}
/**
* Remove the user from the database.
*
* @param Subscription $subscription The specified subscription.
* @return \Illuminate\Http\Response
*/
public function destroy(Subscription $subscription)
{
if (SubscriptionConductor::destroyable($subscription) === true) {
$subscription->delete();
return $this->respondNoContent();
} else {
return $this->respondForbidden();
}
}
/**
* Remove the user from the database.
*
* @param SubscriptionRequest $request The specified subscription.
* @return \Illuminate\Http\Response
*/
public function destroyByEmail(SubscriptionRequest $request)
{
$subscription = Subscription::where('email', $request->email)->first();
if ($subscription !== null) {
$subscription->delete();
dispatch((new SendEmailJob($request->email, new SubscriptionUnsubscribed($request->email))))->onQueue('mail');
}
return $this->respondNoContent();
}
}

View File

@@ -1,359 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Conductors\EventConductor;
use App\Enum\HttpResponseCodes;
use App\Http\Requests\UserRequest;
use App\Http\Requests\UserForgotPasswordRequest;
use App\Http\Requests\UserRegisterRequest;
use App\Http\Requests\UserResendVerifyEmailRequest;
use App\Http\Requests\UserResetPasswordRequest;
use App\Http\Requests\UserVerifyEmailRequest;
use App\Jobs\SendEmailJob;
use App\Mail\ChangedEmail;
use App\Mail\ChangedPassword;
use App\Mail\ChangeEmailVerify;
use App\Mail\ForgotPassword;
use App\Mail\EmailVerify;
use App\Models\User;
use App\Models\UserCode;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Conductors\UserConductor;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Container\BindingResolutionException;
class UserController extends ApiController
{
/**
* ApplicationController constructor.
*/
public function __construct()
{
$this->middleware('auth:sanctum')
->except([
'index',
'show',
'register',
'exists',
'forgotPassword',
'resetPassword',
'verifyEmail',
'resendVerifyEmailCode',
'eventList',
]);
}
/**
* Display a listing of the resource.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
list($collection, $total) = UserConductor::request($request);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
}
/**
* Store a newly created user in the database.
*
* @param \App\Http\Requests\UserRequest $request The endpoint request.
* @return \Illuminate\Http\Response
*/
public function store(UserRequest $request)
{
if (UserConductor::creatable() === true) {
$user = User::create($request->all());
return $this->respondAsResource(UserConductor::model($request, $user), ['respondCode' => HttpResponseCodes::HTTP_CREATED]);
} else {
return $this->respondForbidden();
}
}
/**
* Display the specified user.
*
* @param \Illuminate\Http\Request $request The endpoint request.
* @param \App\Models\User $user The user model.
* @return \Illuminate\Http\Response
*/
public function show(Request $request, User $user)
{
if (UserConductor::viewable($user) === true) {
return $this->respondAsResource(UserConductor::model($request, $user));
}
return $this->respondForbidden();
}
/**
* Update the specified resource in storage.
*
* @param \App\Http\Requests\UserRequest $request The user update request.
* @param \App\Models\User $user The specified user.
* @return \Illuminate\Http\Response
*/
public function update(UserRequest $request, User $user)
{
if (UserConductor::updatable($user) === true) {
$input = [];
$updatable = ['first_name', 'last_name', 'email', 'phone', 'password', 'display_name'];
if ($request->user()->hasPermission('admin/user') === true) {
$updatable = array_merge($updatable, ['email_verified_at']);
}
$input = $request->only($updatable);
if (array_key_exists('password', $input) === true) {
$input['password'] = Hash::make($request->input('password'));
}
$user->update($input);
return $this->respondAsResource(UserConductor::model($request, $user));
}
return $this->respondForbidden();
}
/**
* Remove the user from the database.
*
* @param \App\Models\User $user The specified user.
* @return \Illuminate\Http\Response
*/
public function destroy(User $user)
{
if (UserConductor::destroyable($user) === true) {
$user->delete();
return $this->respondNoContent();
}
return $this->respondForbidden();
}
/**
* Register a new user
*
* @param \App\Http\Requests\UserRegisterRequest $request The register user request.
*/
public function register(UserRegisterRequest $request): JsonResponse
{
try {
$userData = $request->only([
'first_name',
'last_name',
'email',
'phone',
'password',
'display_name',
]);
$userData['password'] = Hash::make($userData['password']);
$user = User::where('email', $request->input('email'))
->whereNull('password')
->first();
if ($user === null) {
$user = User::create($userData);
} else {
unset($userData['email']);
$user->update($userData);
}//end if
$code = $user->codes()->create([
'action' => 'verify-email',
]);
dispatch((new SendEmailJob($user->email, new EmailVerify($user, $code->code))))->onQueue('mail');
return response()->json([
'message' => 'Check your email for a welcome code.'
]);
} catch (\Exception $e) {
return response()->json([
'message' => 'A server error occurred. Please try again later' . $e
], 500);
}//end try
}
/**
* Generates a new reset password code
*
* @param \App\Http\Requests\UserForgotPasswordRequest $request The reset password request.
* @return \Illuminate\Http\Response
*/
public function forgotPassword(UserForgotPasswordRequest $request)
{
$user = User::where('email', $request->input('email'))->first();
if ($user !== null) {
$user->codes()->where('action', 'reset-password')->delete();
$code = $user->codes()->create([
'action' => 'reset-password'
]);
dispatch((new SendEmailJob($user->email, new ForgotPassword($user, $code->code))))->onQueue('mail');
return $this->respondNoContent();
}
return $this->respondNotFound();
}
/**
* Resets a user password
*
* @param \App\Http\Requests\UserResetPasswordRequest $request The reset password request.
* @return \Illuminate\Http\Response
*/
public function resetPassword(UserResetPasswordRequest $request)
{
UserCode::clearExpired();
$code = UserCode::where('code', $request->input('code'))->where('action', 'reset-password')->first();
if ($code !== null) {
$user = $code->user()->first();
$code->delete();
$user->codes()->where('action', 'verify-email')->delete();
$user->password = Hash::make($request->input('password'));
if ($user->email_verified_at === null) {
$user->email_verified_at = now();
}
$user->save();
dispatch((new SendEmailJob($user->email, new ChangedPassword($user))))->onQueue('mail');
return $this->respondNoContent();
}
return $this->respondError([
'code' => 'The code was not found or has expired.'
]);
}
/**
* Verify an email code
*
* @param \App\Http\Requests\UserVerifyEmailRequest $request The verify email request.
* @return \Illuminate\Http\Response
*/
public function verifyEmail(UserVerifyEmailRequest $request)
{
UserCode::clearExpired();
$code = UserCode::where('code', $request->input('code'))->where('action', 'verify-email')->first();
if ($code !== null) {
$user = $code->user()->first();
$new_email = $code->data;
if ($new_email === null) {
if ($user->email_verified_at === null) {
$user->email_verified_at = now();
}
} else {
dispatch((new SendEmailJob($user->email, new ChangedEmail($user, $user->email, $new_email))))
->onQueue('mail');
$user->email = $new_email;
$user->email_verified_at = now();
}
$code->delete();
$user->save();
return $this->respondNoContent();
}//end if
return $this->respondWithErrors([
'code' => 'The code was not found or has expired.'
]);
}
/**
* Resend a new verify email
*
* @param \App\Http\Requests\UserResendVerifyEmailRequest $request The resend verify email request.
*/
public function resendVerifyEmail(UserResendVerifyEmailRequest $request): JsonResponse
{
UserCode::clearExpired();
$user = User::where('email', $request->input('email'))->first();
if ($user !== null) {
$code = $user->codes()->where('action', 'verify-email')->first();
$code->regenerate();
$code->save();
if ($code->data === null) {
dispatch((new SendEmailJob($user->email, new EmailVerify($user, $code->code))))->onQueue('mail');
} else {
dispatch((new SendEmailJob($user->email, new ChangeEmailVerify($user, $code->code, $code->data))))
->onQueue('mail');
}
}
return response()->json(['message' => 'Verify email sent if user registered and required']);
}
/**
* Resend verification email
*
* @param \App\Http\Requests\UserResendVerifyEmailRequest $request The resend user request.
* @return \Illuminate\Http\Response
*/
public function resendVerifyEmailCode(UserResendVerifyEmailRequest $request)
{
$user = User::where('email', $request->input('email'))->first();
if ($user !== null) {
$user->codes()->where('action', 'verify-email')->delete();
if ($user->email_verified_at === null) {
$code = $user->codes()->create([
'action' => 'verify-email'
]);
dispatch((new SendEmailJob($user->email, new EmailVerify($user, $code->code))))->onQueue('mail');
}
return $this->respondNoContent();
}
return $this->respondNotFound();
}
/**
* Return a JSON event list of a user.
*
* @param Request $request The http request.
* @param User $user The specified user.
*/
public function eventList(Request $request, User $user): JsonResponse
{
if ($request->user() !== null && ($request->user() === $user || $request->user()->hasPermission('admin/events') === true)) {
$collection = $user->events;
$total = $collection->count();
$collection = EventConductor::collection($request, $collection);
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]
]
);
} else {
return $this->respondForbidden();
}
}
}

View File

@@ -0,0 +1,319 @@
<?php
namespace App\Http\Controllers;
use App\Jobs\SendEmail;
use App\Mail\UserEmailUpdateConfirm;
use App\Mail\UserLogin;
use App\Mail\UserLoginBackupCode;
use App\Mail\UserRegister;
use App\Mail\UserWelcome;
use App\Models\Token;
use App\Models\User;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
class AuthController extends Controller
{
/**
* Show the login form or if token present, process the login
*
* @param Request $request
* @return View|RedirectResponse
*/
public function showLogin(Request $request): View|RedirectResponse
{
if (auth()->check()) {
return redirect()->action([HomeController::class, 'index']);
}
$token = $request->query('token');
if ($token) {
return $this->LoginByToken($token);
}
return view('auth.login');
}
/**
* Process the login form
*
* @param Request $request
* @return View|RedirectResponse
*/
public function postLogin(Request $request): View|RedirectResponse
{
$request->validate([
'email' => 'required|email',
'captcha' => 'required_captcha',
], [
'email.required' => __('validation.custom_messages.email_required'),
'email.email' => __('validation.custom_messages.email_invalid'),
]);
$forceEmailLogin = false;
if($request->has('code')) {
$user = User::where('email', $request->email)->whereNotNull('email_verified_at')->first();
if($user) {
$tfa = AccountController::getTFAInstance();
if ($request->code && $tfa->verifyCode($user->tfa_secret, $request->code, 4)) {
$data = ['url' => session()->pull('url.intended', null)];
return $this->loginByUser($user, $data);
}
}
return view('auth.login-2fa', ['email' => $request->email])->withErrors([
'code' => 'The 2FA code is not valid',
]);
}
if($request->has('backup_code')) {
$user = User::where('email', $request->email)->whereNotNull('email_verified_at')->first();
if($user) {
if($user->verifyBackupCode($request->backup_code)) {
$data = ['url' => session()->pull('url.intended', null)];
dispatch(new SendEmail($user->email, new UserLoginBackupCode($user->email)))->onQueue('mail');
return $this->loginByUser($user, $data);
}
}
return view('auth.login-2fa', ['email' => $request->email, 'method' => 'backup'])->withErrors([
'backup_code' => 'The backup code is not valid',
]);
}
if($request->has('method')) {
if($request->get('method') === 'email') {
$forceEmailLogin = true;
} else {
abort(404);
}
}
$user = User::where('email', $request->email)->whereNotNull('email_verified_at')->first();
if ($user) {
if (!$forceEmailLogin && $user->tfa_secret !== null) {
return view('auth.login-2fa', ['user' => $user]);
}
$token = $user->tokens()->create([
'type' => 'login',
'data' => ['url' => session()->pull('url.intended', null)],
]);
dispatch(new SendEmail($user->email, new UserLogin($token->id, $user->getName(), $user->email)))->onQueue('mail');
return view('auth.login-link');
}
session()->flash('status', 'not-found');
return view('auth.login');
}
/**
* Process the login by token
*
* @param string $tokenStr
* @return View|RedirectResponse
*/
public function loginByToken(string $tokenStr): View|RedirectResponse
{
$token = Token::where('id', $tokenStr)
->where('type', 'login')
->where('expires_at', '>', now())
->first();
if ($token) {
$user = $token->user;
if($user) {
$token->delete();
return $this->loginByUser($user, $token->data);
}
}
session()->flash('message', 'That token has expired or is invalid');
session()->flash('message-title', 'Log in failed');
session()->flash('message-type', 'danger');
return view('auth.login');
}
/**
* Process the login by user
*
* @param User $user
* @param array $data
* @return RedirectResponse
*/
public function loginByUser(User $user, array $data = [])
{
$url = null;
if($data && isset($data->url) && $data->url) {
$url = $data->url;
}
Auth::login($user);
session()->flash('message', 'You have been logged in');
session()->flash('message-title', 'Logged in');
session()->flash('message-type', 'success');
if($url) {
return redirect($url);
}
return redirect()->action([HomeController::class, 'index']);
}
/**
* Process the user logout
*
* @return RedirectResponse
*/
public function logout(): RedirectResponse
{
auth()->logout();
session()->flash('message', 'You have been logged out');
session()->flash('message-title', 'Logged out');
session()->flash('message-type', 'warning');
return redirect()->route('index');
}
/**
* Show the registration form or if token present, process the registration
*
* @param Request $request
* @return View|RedirectResponse
*/
public function showRegister(Request $request): View|RedirectResponse
{
if (auth()->check()) {
return redirect()->route('index');
}
$tokenStr = $request->query('token');
if ($tokenStr) {
$token = Token::where('id', $tokenStr)
->where('type', 'register')
->where('expires_at', '>', now())
->first();
if ($token) {
$user = $token->user;
if ($user) {
$user->email_verified_at = now();
$user->save();
$user->tokens()->where('type', 'register')->delete();
dispatch(new SendEmail($user->email, new UserWelcome($user->email)))->onQueue('mail');
$this->loginByUser($user);
return redirect()->route('index');
}
}
session()->flash('message', 'That token has expired or is invalid');
session()->flash('message-title', 'Registration failed');
session()->flash('message-type', 'danger');
}
return view('auth.register');
}
/**
* Process the registration form
*
* @param Request $request
* @return View|RedirectResponse
*/
public function postRegister(Request $request): View|RedirectResponse
{
$request->validate([
'email' => 'required|email',
'captcha' => 'required_captcha',
], [
'email.required' => __('validation.custom_messages.email_required'),
'email.email' => __('validation.custom_messages.email_invalid')
]);
$key = $request->get('name', '');
$passHoneypot = ($key === 'AC9E94587F163AD93174FBF3DFDF9645B886960F2F8DD6D60F81CDB6DCDA3BC33');
$user = User::where('email', $request->email)->first();
if($user) {
if($user->email_verified_at !== null) {
return redirect()->back()->withInput()->withErrors([
'email' => __('validation.custom_messages.email_exists'),
]);
}
} else if($passHoneypot) {
$user = User::create([
'email' => $request->email,
]);
}
if($passHoneypot) {
Log::channel('honeypot')->info('Valid key used for registration using email: ' . $request->email . ', ip address: ' . $request->ip() . ', user agent: ' . $request->userAgent());
$user->tokens()->where('type', 'register')->delete();
$token = $user->tokens()->create([
'type' => 'register',
'data' => ['url' => session()->pull('url.intended', null)],
]);
dispatch(new SendEmail($user->email, new UserRegister($token->id, $user->email)))->onQueue('mail');
} else {
Log::channel('honeypot')->info('Invalid key used for registration using email: ' . $request->email . ', ip address: ' . $request->ip() . ', user agent: ' . $request->userAgent() . ', key: ' . $key);
}
return view('auth.register-link');
}
/**
* Confirm the user email update.
*
* @param Request $request
* @return RedirectResponse
*/
public function updateEmail(Request $request): RedirectResponse
{
$tokenStr = $request->query('token');
$token = Token::where('id', $tokenStr)
->where('type', 'email-update')
->where('expires_at', '>', now())
->first();
if($token && $token->user) {
if($token->data && isset($token->data['email'])) {
$user = $token->user;
$user->email = $token->data['email'];
$user->email_verified_at = now();
$user->save();
$user->tokens()->where('type', 'email-update')->delete();
session()->flash('message', 'Your email has been updated');
session()->flash('message-title', 'Email updated');
session()->flash('message-type', 'success');
dispatch(new SendEmail($user->email, new UserEmailUpdateConfirm($user->email)))->onQueue('mail');
return redirect()->route('index');
}
}
session()->flash('message', 'That token has expired or is invalid');
session()->flash('message-title', 'Email update failed');
session()->flash('message-type', 'danger');
return redirect()->route('index');
}
}

View File

@@ -2,12 +2,7 @@
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
abstract class Controller
{
use AuthorizesRequests;
use ValidatesRequests;
//
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers;
use App\Models\Post;
use App\Models\Workshop;
class HomeController extends Controller
{
public function index()
{
// $posts = Post::query()->orderBy('created_at', 'desc')->limit(4)->get();
$workshops = Workshop::query()->where('starts_at', '>', now())->where('status', '!=', 'private')->orderBy('starts_at', 'asc')->limit(4)->get();
return view('home', [
// 'posts' => $posts,
'workshops' => $workshops,
]);
}
}

View File

@@ -0,0 +1,102 @@
<?php
namespace App\Http\Controllers;
use App\Models\Location;
use App\Models\Post;
use Illuminate\Http\Request;
class LocationController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
$query = Location::query();
if($request->has('search')) {
$query->where('name', 'like', '%' . $request->search . '%');
$query->orWhere('address', 'like', '%' . $request->search . '%');
}
$locations = $query->orderBy('name')->paginate(12)->onEachSide(1);
return view('admin.location.index', [
'locations' => $locations
]);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('admin.location.edit');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$request->validate([
'name' => 'required',
'address_url' => 'nullable|url',
], [
// 'firstname.required' => __('validation.custom_messages.firstname_required'),
// 'surname.required' => __('validation.custom_messages.surname_required'),
]);
Location::create(array_merge(
$request->all(),
));
session()->flash('message', 'Location has been created');
session()->flash('message-title', 'Location created');
session()->flash('message-type', 'success');
return redirect()->route('admin.location.index');
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Location $location)
{
return view('admin.location.edit', ['location' => $location]);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Location $location)
{
$request->validate([
'name' => 'required',
'address_url' => 'url',
], [
// 'firstname.required' => __('validation.custom_messages.firstname_required'),
// 'surname.required' => __('validation.custom_messages.surname_required'),
]);
$location->update($request->all());
session()->flash('message', 'Location has been updated');
session()->flash('message-title', 'Location updated');
session()->flash('message-type', 'success');
return redirect()->route('admin.location.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Location $location)
{
$location->delete();
session()->flash('message', 'Location has been deleted');
session()->flash('message-title', 'Location deleted');
session()->flash('message-type', 'danger');
return redirect()->route('admin.location.index');
}
}

View File

@@ -0,0 +1,549 @@
<?php
namespace App\Http\Controllers;
use App\Exceptions\FileInvalidException;
use App\Exceptions\FileTooLargeException;
use App\Helpers;
use App\Models\Media;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class MediaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
if(!$request->wantsJson()) {
abort(404);
}
$media = $this->getMedia($request);
return response()->json($media);
}
public function admin_index(Request $request)
{
$media = $this->getMedia($request);
return view('admin.media.index', [
'media' => $media,
]);
}
public function getMedia(Request $request)
{
$query = Media::query();
$perPage = $request->input('per_page', 25);
if(!empty($request->get('search'))) {
$query->where(function($query) use ($request) {
$query->where('title', 'like', '%' . $request->search . '%');
$query->orWhere('name', 'like', '%' . $request->search . '%');
});
}
if($request->has('mime_type')) {
$mime_types = explode(',', $request->mime_type);
$query->where(function ($query) use ($mime_types) {
foreach ($mime_types as $mime_type) {
$mime_type = str_replace('*', '%', $mime_type);
$query->orWhere('mime_type', 'like', $mime_type);
}
});
}
$media = $query->orderBy('created_at', 'desc');
if($request->wantsJson() && !(empty($request->input('selected'))) && empty($request->get('search')) && !$request->has('page')) {
$selected = $request->input('selected')[0];
$selectedMedia = $media->get();
$selectedMediaIndex = $selectedMedia->search(function ($item) use ($selected) {
return $item->name == $selected;
});
if ($selectedMediaIndex !== false) {
$page = intdiv($selectedMediaIndex, $perPage) + 1;
$request->merge(['page' => $page]);
}
}
$media = $media->paginate($perPage)->onEachSide(1);
// Transform the 'password' field of each item in the collection
$media->getCollection()->transform(function ($item) {
$item->password = $item->password ? 'yes' : null;
return $item;
});
return $media;
}
/**
* Display the specified resource.
*/
public function show(Request $request, Media $media)
{
if(!$request->wantsJson()) {
abort(404);
}
return response()->json($media);
}
/**
* Show the form for creating a new resource.
*/
public function admin_create()
{
return view('admin.media.edit');
}
/**
* Store a newly created resource in storage.
*/
public function admin_store(Request $request)
{
$file = null;
$cleanupPath = null;
// Check if the endpoint received a file...
if($request->hasFile('file')) {
try {
$file = $this->upload($request);
if(is_array($file) && !empty($file['chunk'])) {
return response()->json([
'message' => 'Chunk stored',
'upload_token' => $file['token'] ?? null,
]);
} else if(!$file) {
return response()->json([
'message' => 'An error occurred processing the file.',
'errors' => [
'file' => 'An error occurred processing the file.'
]
], 422);
}
if(!$request->has('title')) {
return response()->json([
'message' => 'The file ' . $file->getClientOriginalName() . ' has been uploaded',
'file' => [
'name' => $file->getClientOriginalName(),
'size' => $file->getSize(),
'mime_type' => $file->getMimeType()
]
]);
}
} catch(\Exception $e) {
return response()->json([
'message' => $e->getMessage(),
'errors' => [
'file' => $e->getMessage()
]
], 422);
}
// else check if it received a file name of a previous upload...
} else if($request->has('upload_token') || $request->has('file')) {
$uploadToken = $request->input('upload_token', $request->input('file'));
$chunkUploads = session()->get('chunk_uploads', []);
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
return response()->json([
'message' => 'Could not find the referenced file on the server.',
'errors' => [
'file' => 'Could not find the referenced file on the server.'
]
], 422);
}
$tempFileName = $chunkUploads[$uploadToken];
if(!file_exists($tempFileName)) {
return response()->json([
'message' => 'Could not find the referenced file on the server.',
'errors' => [
'file' => 'Could not find the referenced file on the server ('.$tempFileName.').'
]
], 422);
}
$fileMime = mime_content_type($tempFileName);
if($fileMime === false) {
$fileMime = 'application/octet-stream';
}
$fileName = $request->input('filename', 'upload');
$fileName = Helpers::cleanFileName($fileName);
if ($fileName === '') {
$fileName = 'upload';
}
$file = new UploadedFile($tempFileName, $fileName, $fileMime, null, true);
$cleanupPath = $tempFileName;
unset($chunkUploads[$uploadToken]);
session()->put('chunk_uploads', $chunkUploads);
}
// Check there is an actual file
if(!$file) {
return response()->json([
'message' => 'A file is required.',
'errors' => [
'file' => 'A file is required.'
]
], 422);
}
if(!$request->has('title')) {
return response()->json([
'message' => 'A title is required',
'errors' => [
'title' => 'A title is required'
]
], 422);
}
$fileName = $file->getClientOriginalName();
$name = pathinfo($fileName, PATHINFO_FILENAME);
$extension = pathinfo($fileName, PATHINFO_EXTENSION);
$name = Helpers::cleanFileName($name);
if(Media::find($name . '.' . $extension) !== null) {
$increment = 1;
$name = preg_replace('/-\d+$/', '', $name);
while(Media::find($name . '-' . $increment . '.' . $extension) !== null) {
$increment++;
}
$fileName = $name . '-' . $increment . '.' . $extension;
}
$hash = hash_file('sha256', $file->path());
$storage = Storage::disk('media');
$exists = $storage->exists($hash);
if(!$exists) {
if($file->storeAs('/', $hash, 'media') === false) {
if($request->wantsJson()) {
return response()->json([
'message' => 'A server error occurred uploading the file.',
], 500);
} else {
session()->flash('message', 'A server error occurred uploading the file.');
session()->flash('message-title', 'Upload failed');
session()->flash('message-type', 'danger');
return redirect()->back();
}
}
}
$media = Media::Create([
'title' => $request->get('title', Helpers::filenameToTitle($fileName)),
'user_id' => auth()->id(),
'name' => $fileName,
'size' => $file->getSize(),
'mime_type' => $file->getMimeType(),
'hash' => $hash
]);
if(!$exists) {
$media->generateVariants(false);
} else {
// find media with the same hash that also has variants and copy them
$mediaWithVariants = Media::where('hash', $hash)->where('variants', '!=', '')->orderBy('created_at')->first();
if($mediaWithVariants) {
$media->variants = $mediaWithVariants->variants;
$media->save();
}
}
if(is_string($cleanupPath)) {
$realPath = realpath($cleanupPath);
$tempDir = realpath(sys_get_temp_dir());
if($realPath !== false && $tempDir !== false && str_starts_with($realPath, $tempDir . DIRECTORY_SEPARATOR)) {
@unlink($realPath);
}
}
if($request->wantsJson()) {
return response()->json([
'message' => 'File has been uploaded',
'name' => $media->name,
'size' => $media->size,
'mime_type' => $media->mime_type
]);
} else {
session()->flash('message', 'Media has been uploaded');
session()->flash('message-title', 'Media uploaded');
session()->flash('message-type', 'success');
return redirect()->route('admin.media.index');
}
}
/**
* Show the form for editing the specified resource.
*/
public function admin_edit(Media $media)
{
return view('admin.media.edit', ['medium' => $media]);
}
/**
* Update the specified resource in storage.
*/
public function admin_update(Request $request, Media $media)
{
$max_size = Helpers::getMaxUploadSize();
$validator = Validator::make($request->all(), [
'title' => 'required',
// 'file' => 'nullable|file|max:' . (max(round($max_size / 1024),0)),
], [
'title.required' => __('validation.custom_messages.title_required'),
// 'file.required' => __('validation.custom_messages.file_required'),
// 'file.file' => __('validation.custom_messages.file_file'),
// 'file.max' => __('validation.custom_messages.file_max', ['max' => Helpers::bytesToString($max_size)])
]);
if ($validator->fails()) {
return redirect()->back()->withErrors($validator)->withInput();
}
$mediaData = $request->all();
// $file = null;
// if($request->has('file')) {
// $file = $request->file('file');
//
// $name = $file->getClientOriginalName();
// $name = Helpers::cleanFileName($name);
// if ($name !== $media->name) {
// if (Media::find($name) !== null) {
// $increment = 2;
// while (Media::find($name . '-' . $increment) !== null) {
// $increment++;
// }
//
// $name = $name . '-' . $increment;
// }
// }
//
// $hash = hash_file('sha256', $file->path());
//
// $storage = Storage::disk('media');
// if (!$storage->exists($hash)) {
// if ($file->storeAs('/', $hash, 'media') === false) {
// session()->flash('message', 'A server error occurred uploading the file.');
// session()->flash('message-title', 'Upload failed');
// session()->flash('message-type', 'danger');
// return redirect()->back();
// }
// }
//
// $mediaData['name'] = $name;
// $mediaData['size'] = $file->getSize();
// $mediaData['mime_type'] = $file->getMimeType();
// $mediaData['hash'] = $hash;
// }
if($request->get('password_clear') === 'on') {
$mediaData['password'] = null;
} else {
$password = $request->get('password');
if($password !== null && $password !== '') {
$mediaData['password'] = password_hash($request->get('password'), PASSWORD_DEFAULT);
} else {
unset($mediaData['password']);
}
}
$media->update($mediaData);
// if($file) {
// $media->generateVariants(false);
// unlink($file);
// }
session()->flash('message', 'Media has been updated');
session()->flash('message-title', 'Media updated');
session()->flash('message-type', 'success');
return redirect()->route('admin.media.index');
}
/**
* Remove the specified resource from storage.
*/
public function admin_destroy(Request $request, Media $media)
{
$media->delete();
session()->flash('message', 'Media has been deleted');
session()->flash('message-title', 'Media deleted');
session()->flash('message-type', 'danger');
if($request->wantsJson()) {
return response()->json([
'success' => true,
'redirect' => route('admin.media.index'),
]);
}
return redirect()->route('admin.media.index');
}
/**
* @throws FileInvalidException
* @throws FileTooLargeException
*/
private function upload(Request $request)
{
$max_size = Helpers::getMaxUploadSize();
$file = $request->file('file');
if(!$file->isValid()) {
throw new FileInvalidException('The file is invalid');
}
$fileName = $request->input('filename', $file->getClientOriginalName());
$fileName = Helpers::cleanFileName($fileName);
if ($fileName === '') {
$extension = strtolower($file->getClientOriginalExtension());
$fileName = 'upload' . ($extension !== '' ? '.' . $extension : '');
}
if(($request->has('filestart') || $request->has('fileappend')) && $request->has('filesize')) {
$fileSize = $request->get('filesize');
if($fileSize > $max_size) {
throw new FileTooLargeException('The file is larger than the maximum size allowed of ' . Helpers::bytesToString($max_size));
}
$chunkUploads = session()->get('chunk_uploads', []);
$uploadToken = $request->input('upload_token');
if($request->has('filestart')) {
$uploadToken = bin2hex(random_bytes(16));
$tempFilePath = tempnam(sys_get_temp_dir(), 'chunk-' . Auth::id() . '-');
if($tempFilePath === false) {
throw new FileInvalidException('Unable to create a temporary upload file.');
}
$chunkUploads[$uploadToken] = $tempFilePath;
session()->put('chunk_uploads', $chunkUploads);
} else {
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
throw new FileInvalidException('Invalid upload token.');
}
$tempFilePath = $chunkUploads[$uploadToken];
}
$filemode = 'a';
if($request->has('filestart')) {
$filemode = 'w';
}
// Append the chunk to the temporary file
$fp = fopen($tempFilePath, $filemode);
if ($fp) {
fwrite($fp, file_get_contents($file->getRealPath()));
fclose($fp);
}
// Check if the upload is complete
if (filesize($tempFilePath) >= $fileSize) {
$fileMime = mime_content_type($tempFilePath);
if($fileMime === false) {
$fileMime = 'application/octet-stream';
}
if(is_string($uploadToken) && isset($chunkUploads[$uploadToken])) {
unset($chunkUploads[$uploadToken]);
session()->put('chunk_uploads', $chunkUploads);
}
return new UploadedFile($tempFilePath, $fileName, $fileMime, null, true);
} else {
return [
'chunk' => true,
'token' => $uploadToken,
];
}
}
return $file;
}
public function download(Request $request, Media $media)
{
$file = $media->path();
if($file === null) {
abort(404, 'File not found');
}
if($media->password !== null && !Auth::user()?->isAdmin()) {
if(!$request->has('password')) {
return view('media-password');
} else {
$password = $request->get('password');
if($password === '' || $password === null) {
return view('media-password', [
'error' => 'Password is required',
]);
}
if(!password_verify(base64_decode($password), $media->password)) {
return view('media-password', [
'error' => 'Password is incorrect',
]);
}
}
}
$variant = '';
$download = false;
$variants = array_keys($media->getVariantTypes());
$query = $request->getQueryString();
if($query !== '') {
$queryList = explode('&', $query);
foreach($queryList as $queryItem) {
$parts = explode('=', $queryItem);
if($variant === '' && in_array($parts[0], $variants) && ($parts[1] === '' || filter_var($parts[1], FILTER_VALIDATE_BOOLEAN))) {
$variant = $parts[0];
}
if($parts[0] === 'download' && ($parts[1] === '' || filter_var($parts[1], FILTER_VALIDATE_BOOLEAN))) {
$download = true;
}
}
}
$mime_type = $media->mime_type;
$name = $media->name;
if($variant !== '') {
$variantFile = $media->getClosestVariant($variant);
$file = $variantFile['file'];
$mime_type = $variantFile['mime_type'];
$name = $variantFile['name'];
}
$headers = [
'Content-Type' => $mime_type,
'Content-Disposition' => ($download ? 'attachment; ' : '') . 'filename="' . $name . '"',
];
return response()->file($file, $headers);
}
}

View File

@@ -0,0 +1,147 @@
<?php
namespace App\Http\Controllers;
use App\Helpers;
use App\Models\Media;
use App\Models\Post;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
class PostController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
$query = Post::query();
$query->where('status', 'published');
if($request->has('search')) {
$query->where('title', 'like', '%' . $request->search . '%');
$query->orWhere('content', 'like', '%' . $request->search . '%');
}
$posts = $query->orderBy('created_at', 'desc')->paginate(12)->onEachSide(1);
return view('post.index', [
'posts' => $posts
]);
}
/**
* Display a listing of the resource.
*/
public function admin_index(Request $request)
{
$query = Post::query();
if($request->has('search')) {
$query->where('title', 'like', '%' . $request->search . '%');
$query->orWhere('content', 'like', '%' . $request->search . '%');
}
$posts = $query->orderBy('created_at', 'desc')->paginate(12)->onEachSide(1);
return view('admin.post.index', [
'posts' => $posts
]);
}
/**
* Show the form for creating a new resource.
*/
public function admin_create()
{
return view('admin.post.edit');
}
/**
* Store a newly created resource in storage.
*/
public function admin_store(Request $request)
{
$request->validate([
'title' => 'required',
'content' => 'required',
'hero_media_name' => 'required|exists:media,name',
], [
'title.required' => __('validation.custom_messages.title_required'),
'content.required' => __('validation.custom_messages.content_required'),
'hero_media_name.required' => __('validation.custom_messages.hero_media_name_required'),
]);
$postData = $request->all();
$postData['user_id'] = auth()->user()->id;
$post = Post::create($postData);
$post->updateFiles($request->input('files'));
$post->updateFiles($request->input('gallery'), 'gallery');
$post->updateFiles($request->input('videos'), 'videos');
session()->flash('message', 'Post has been created');
session()->flash('message-title', 'Post created');
session()->flash('message-type', 'success');
return redirect()->route('admin.post.index');
}
/**
* Display the specified resource.
*/
public function show(Post $post)
{
return view('post.show', ['post' => $post]);
}
/**
* Show the form for editing the specified resource.
*/
public function admin_edit(Post $post)
{
return view('admin.post.edit', ['post' => $post]);
}
/**
* Update the specified resource in storage.
*/
public function admin_update(Request $request, Post $post)
{
$request->validate([
'title' => 'required',
'content' => 'required',
'hero_media_name' => 'required|exists:media,name',
], [
'title.required' => __('validation.custom_messages.title_required'),
'content.required' => __('validation.custom_messages.content_required'),
'hero_media_name.required' => __('validation.custom_messages.hero_media_name_required'),
]);
$postData = $request->all();
$post->update($postData);
$post->updateFiles($request->input('files'));
$post->updateFiles($request->input('gallery'), 'gallery');
$post->updateFiles($request->input('videos'), 'videos');
session()->flash('message', 'Post has been updated');
session()->flash('message-title', 'Post updated');
session()->flash('message-type', 'success');
return redirect()->route('admin.post.index');
}
/**
* Remove the specified resource from storage.
*/
public function admin_destroy(Post $post)
{
$post->delete();
session()->flash('message', 'Post has been deleted');
session()->flash('message-title', 'Post deleted');
session()->flash('message-type', 'danger');
return redirect()->route('admin.post.index');
}
}

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Http\Controllers;
use App\Models\Post;
use App\Models\Workshop;
use Carbon\Carbon;
use Illuminate\Http\Request;
class SearchController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
$search = $request->get('q', '');
$search_words = explode(' ', $search); // Split the search query into words[1]
$workshopQuery = Workshop::query()->where('status', '!=', 'draft');
$workshopQuery->where(function ($query) use ($search_words) {
foreach ($search_words as $word) {
$query->orWhere(function ($subQuery) use ($word) {
$subQuery->where('title', 'like', '%' . $word . '%')
->orWhere('content', 'like', '%' . $word . '%')
->orWhereHas('location', function ($locationQuery) use ($word) {
$locationQuery->where('name', 'like', '%' . $word . '%');
});
});
}
});
$workshops = $workshopQuery->orderBy('starts_at', 'desc')
->paginate(6, ['*'], 'workshop');
// $postQuery = Post::query()->where('status', 'published');
// $postQuery->where(function ($query) use ($search_words) {
// foreach ($search_words as $word) {
// $query->where(function ($subQuery) use ($word) {
// $subQuery->where('title', 'like', '%' . $word . '%')
// ->orWhere('content', 'like', '%' . $word . '%');
// });
// }
// });
//
// $posts = $postQuery->orderBy('created_at', 'desc')
// ->paginate(6, ['*'], 'post')
// ->onEachSide(1);
return view('search', [
'workshops' => $workshops,
// 'posts' => $posts,
'search' => $search,
]);
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Http\Controllers;
use App\Models\EmailSubscriptions;
use App\Models\SentEmail;
use Illuminate\Http\Request;
class SubscribeController extends Controller
{
/**
* Display a listing of the resource.
*/
public function destroy($email)
{
$emailModel = SentEmail::where('id', $email)->first();
if (!$emailModel) {
// Email not found, redirect to home page with a message
return redirect()->route('index')->with([
'message' => 'The unsubscribe link is invalid or has expired.',
'message-title' => 'Invalid Unsubscribe Link',
'message-type' => 'warning'
]);
}
// Existing unsubscribe logic
$subscriptions = EmailSubscriptions::where('email', $emailModel->recipient)->get();
if ($subscriptions->isEmpty()) {
session()->flash('message', 'You are already unsubscribed.');
session()->flash('message-title', 'Already Unsubscribed');
session()->flash('message-type', 'info');
} else {
EmailSubscriptions::where('email', $emailModel->recipient)->delete();
session()->flash('message', 'You have been successfully unsubscribed.');
session()->flash('message-title', 'Unsubscribed');
session()->flash('message-type', 'success');
}
return redirect()->route('index');
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\Ticket;
use Illuminate\Http\Request;
class TicketController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Ticket $ticket)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Ticket $ticket)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Ticket $ticket)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Ticket $ticket)
{
//
}
}

View File

@@ -0,0 +1,167 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Rule;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
$query = User::query();
if($request->has('search')) {
$query->where('firstname', 'like', '%' . $request->search . '%');
$query->orWhere('surname', 'like', '%' . $request->search . '%');
$query->orWhere('phone', 'like', '%' . $request->search . '%');
$query->orWhere('email', 'like', '%' . $request->search . '%');
}
$users = $query->orderBy('created_at', 'desc')->paginate(12)->onEachSide(1);
return view('admin.user.index', [
'users' => $users
]);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('admin.user.create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$request->validate([
'firstname' => '',
'surname' => '',
'email' => 'email|unique:users',
'phone' => '',
'shipping_address' => 'required_with:shipping_city,shipping_postcode,shipping_country,shipping_state',
'shipping_city' => 'required_with:shipping_address,shipping_postcode,shipping_country,shipping_state',
'shipping_postcode' => 'required_with:shipping_address,shipping_city,shipping_country,shipping_state',
'shipping_country' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_state',
'shipping_state' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_country',
'billing_address' => 'required_with:billing_city,billing_postcode,billing_country,billing_state',
'billing_city' => 'required_with:billing_address,billing_postcode,billing_country,billing_state',
'billing_postcode' => 'required_with:billing_address,billing_city,billing_country,billing_state',
'billing_country' => 'required_with:billing_address,billing_city,billing_postcode,billing_state',
'billing_state' => 'required_with:billing_address,billing_city,billing_postcode,billing_country',
], [
'firstname.required' => __('validation.custom_messages.firstname_required'),
'surname.required' => __('validation.custom_messages.surname_required'),
'email.required' => __('validation.custom_messages.email_required'),
'email.email' => __('validation.custom_messages.email_invalid'),
'phone.required' => __('validation.custom_messages.phone_required'),
'shipping_address.required' => __('validation.custom_messages.shipping_address_required'),
'shipping_city.required' => __('validation.custom_messages.shipping_city_required'),
'shipping_postcode.required' => __('validation.custom_messages.shipping_postcode_required'),
'shipping_country.required' => __('validation.custom_messages.shipping_country_required'),
'shipping_state.required' => __('validation.custom_messages.shipping_state_required'),
'billing_address.required' => __('validation.custom_messages.billing_address_required'),
'billing_city.required' => __('validation.custom_messages.billing_city_required'),
'billing_postcode.required' => __('validation.custom_messages.billing_postcode_required'),
'billing_country.required' => __('validation.custom_messages.billing_country_required'),
'billing_state.required' => __('validation.custom_messages.billing_state_required'),
]);
User::create($request->all());
session()->flash('message', 'User has been created');
session()->flash('message-title', 'User created');
session()->flash('message-type', 'success');
return redirect()->route('admin.user.index');
}
/**
* Show the form for editing the specified resource.
*/
public function edit(User $user)
{
return view('admin.user.edit', compact('user'));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, User $user)
{
$request->validate([
'firstname' => '',
'surname' => '',
'email' => ['email', Rule::unique('users')->ignore($user->id)],
'phone' => '',
'shipping_address' => 'required_with:shipping_city,shipping_postcode,shipping_country,shipping_state',
'shipping_city' => 'required_with:shipping_address,shipping_postcode,shipping_country,shipping_state',
'shipping_postcode' => 'required_with:shipping_address,shipping_city,shipping_country,shipping_state',
'shipping_country' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_state',
'shipping_state' => 'required_with:shipping_address,shipping_city,shipping_postcode,shipping_country',
'billing_address' => 'required_with:billing_city,billing_postcode,billing_country,billing_state',
'billing_city' => 'required_with:billing_address,billing_postcode,billing_country,billing_state',
'billing_postcode' => 'required_with:billing_address,billing_city,billing_country,billing_state',
'billing_country' => 'required_with:billing_address,billing_city,billing_postcode,billing_state',
'billing_state' => 'required_with:billing_address,billing_city,billing_postcode,billing_country',
], [
'firstname.required' => __('validation.custom_messages.firstname_required'),
'surname.required' => __('validation.custom_messages.surname_required'),
'email.required' => __('validation.custom_messages.email_required'),
'email.email' => __('validation.custom_messages.email_invalid'),
'phone.required' => __('validation.custom_messages.phone_required'),
'shipping_address.required' => __('validation.custom_messages.shipping_address_required'),
'shipping_city.required' => __('validation.custom_messages.shipping_city_required'),
'shipping_postcode.required' => __('validation.custom_messages.shipping_postcode_required'),
'shipping_country.required' => __('validation.custom_messages.shipping_country_required'),
'shipping_state.required' => __('validation.custom_messages.shipping_state_required'),
'billing_address.required' => __('validation.custom_messages.billing_address_required'),
'billing_city.required' => __('validation.custom_messages.billing_city_required'),
'billing_postcode.required' => __('validation.custom_messages.billing_postcode_required'),
'billing_country.required' => __('validation.custom_messages.billing_country_required'),
'billing_state.required' => __('validation.custom_messages.billing_state_required'),
]);
$user->update($request->all());
session()->flash('message', 'User details have been updated');
session()->flash('message-title', 'Details updated');
session()->flash('message-type', 'success');
return redirect()->back();
}
/**
* Remove the specified resource from storage.
*/
public function destroy(User $user)
{
if($user->id !== '1') {
$user->delete();
session()->flash('message', 'User has been deleted');
session()->flash('message-title', 'User deleted');
session()->flash('message-type', 'success');
} else {
session()->flash('message', 'You cannot delete the main admin user');
session()->flash('message-title', 'User not deleted');
session()->flash('message-type', 'error');
}
return redirect()->route('admin.user.index');
}
}

View File

@@ -0,0 +1,209 @@
<?php
namespace App\Http\Controllers;
use App\Models\Workshop;
use Carbon\Carbon;
use Illuminate\Http\Request;
class WorkshopController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$query = Workshop::query();
$query = $query->where('starts_at', '>=', Carbon::now()->subDays(8))
->orderBy('starts_at', 'asc');
$workshops = $query->paginate(12);
return view('workshop.index', [
'workshops' => $workshops
]);
}
/**
* Display a listing of the resource.
*/
public function past_index()
{
$query = Workshop::query();
$query = $query->where('starts_at', '<', Carbon::now())
->orderBy('starts_at', 'desc');
$workshops = $query->paginate(12);
return view('workshop.index', [
'workshops' => $workshops
]);
}
/**
* Display a listing of the resource.
*/
public function admin_index(Request $request)
{
$query = Workshop::query();
if($request->has('search')) {
$query->where('title', 'like', '%' . $request->search . '%');
$query->orWhere('content', 'like', '%' . $request->search . '%');
}
$workshops = $query->orderBy('starts_at', 'desc')->paginate(12)->onEachSide(1);
return view('admin.workshop.index', [
'workshops' => $workshops
]);
}
/**
* Show the form for creating a new resource.
*/
public function admin_create()
{
return view('admin.workshop.edit');
}
/**
* Store a newly created resource in storage.
*/
public function admin_store(Request $request)
{
$request->validate([
'title' => 'required',
'content' => 'required',
'starts_at' => 'required',
'ends_at' => 'required|after:starts_at',
'publish_at' => 'required',
'closes_at' => 'required',
'status' => 'required',
'hero_media_name' => 'required|exists:media,name',
'registration_data' => 'required_unless:registration,none',
], [
'title.required' => __('validation.custom_messages.title_required'),
'content.required' => __('validation.custom_messages.content_required'),
'starts_at.required' => __('validation.custom_messages.starts_at_required'),
'ends_at.required' => __('validation.custom_messages.ends_at_required'),
'ends_at.after' => __('validation.custom_messages.ends_at_after'),
'publish_at.required' => __('validation.custom_messages.publish_at_required'),
'closes_at.required' => __('validation.custom_messages.closes_at_required'),
'status.required' => __('validation.custom_messages.status_required'),
'hero_media_name.required' => __('validation.custom_messages.hero_media_name_required'),
'hero_media_name.exists' => __('validation.custom_messages.hero_media_name_exists'),
'registration_data.required_unless' => __('validation.custom_messages.registration_data_required_unless'),
]);
$workshopData = $request->all();
$workshopData['user_id'] = auth()->user()->id;
if($workshopData['status'] === 'open' && Carbon::parse($workshopData['starts_at'])->lt(Carbon::now())) {
$workshopData['status'] = 'closed';
}
$workshop = Workshop::create($workshopData);
$workshop->updateFiles($request->input('files'));
session()->flash('message', 'Workshop has been created');
session()->flash('message-title', 'Workshop created');
session()->flash('message-type', 'success');
return redirect()->route('admin.workshop.index');
}
/**
* Display the specified resource.
*/
public function show(Workshop $workshop)
{
if(!auth()->user()?->admin && $workshop->status == 'draft') {
abort(404);
}
return view('workshop.show', ['workshop' => $workshop]);
}
/**
* Show the form for editing the specified resource.
*/
public function admin_edit(Workshop $workshop)
{
return view('admin.workshop.edit', ['workshop' => $workshop]);
}
/**
* Update the specified resource in storage.
*/
public function admin_update(Request $request, Workshop $workshop)
{
$request->validate([
'title' => 'required',
'content' => 'required',
'starts_at' => 'required',
'ends_at' => 'required|after:starts_at',
'publish_at' => 'required',
'closes_at' => 'required',
'status' => 'required',
'hero_media_name' => 'required|exists:media,name',
'registration_data' => 'required_unless:registration,none',
], [
'title.required' => __('validation.custom_messages.title_required'),
'content.required' => __('validation.custom_messages.content_required'),
'starts_at.required' => __('validation.custom_messages.starts_at_required'),
'ends_at.required' => __('validation.custom_messages.ends_at_required'),
'ends_at.after' => __('validation.custom_messages.ends_at_after'),
'publish_at.required' => __('validation.custom_messages.publish_at_required'),
'closes_at.required' => __('validation.custom_messages.closes_at_required'),
'status.required' => __('validation.custom_messages.status_required'),
'hero_media_name.required' => __('validation.custom_messages.hero_media_name_required'),
'hero_media_name.exists' => __('validation.custom_messages.hero_media_name_exists'),
'registration_data.required_unless' => __('validation.custom_messages.registration_data_required_unless'),
]);
$workshopData = $request->all();
if($workshopData['status'] === 'open' && Carbon::parse($workshopData['starts_at'])->lt(Carbon::now())) {
$workshopData['status'] = 'closed';
}
$workshop->update($workshopData);
$workshop->updateFiles($request->input('files'));
session()->flash('message', 'Workshop has been updated');
session()->flash('message-title', 'Workshop updated');
session()->flash('message-type', 'success');
return redirect()->route('admin.workshop.index');
}
/**
* Remove the specified resource from storage.
*/
public function admin_destroy(Workshop $workshop)
{
$workshop->delete();
session()->flash('message', 'Workshop has been deleted');
session()->flash('message-title', 'Workshop deleted');
session()->flash('message-type', 'danger');
return redirect()->route('admin.workshop.index');
}
/**
* Duplicate the specified resource.
*/
public function admin_duplicate(Workshop $workshop)
{
$newWorkshop = $workshop->replicate();
$newWorkshop->title = $newWorkshop->title . ' (copy)';
$newWorkshop->status = 'draft';
$newWorkshop->save();
foreach($workshop->files as $file) {
$newWorkshop->files()->attach($file->name);
}
session()->flash('message', 'Workshop has been duplicated');
session()->flash('message-title', 'Workshop duplicated');
session()->flash('message-type', 'success');
return redirect()->route('admin.workshop.edit', $newWorkshop);
}
}

View File

@@ -1,71 +0,0 @@
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
// \App\Http\Middleware\TrimStrings::class,
// \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
// \App\Http\Middleware\ForceJsonResponse::class,
'useSanctumGuard',
\App\Http\Middleware\LogRequest::class,
],
];
/**
* The application's middleware aliases.
*
* Aliases may be used to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'useSanctumGuard' => \App\Http\Middleware\UseSanctumGuard::class
];
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Http\Middleware;
use App\Models\User;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\HttpFoundation\Response;
class Admin
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
/* @var User $user */
$user = Auth::user();
if ($user) {
if($user->admin == 1) {
return $next($request);
}
abort(403, 'Forbidden');
}
session()->put('url.intended', url()->current());
return redirect()->route('login');
}
}

View File

@@ -1,20 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param mixed $request Request.
*/
protected function redirectTo(mixed $request): ?string
{
if ($request->expectsJson() === false) {
return route('login');
}
}
}

View File

@@ -1,17 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use Closure;
use Illuminate\Http\Request;
class ForceJsonResponse
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
*/
public function handle(Request $request, Closure $next): Response
{
$request->headers->set('Accept', 'application/json');
return $next($request);
}
}

View File

@@ -1,36 +0,0 @@
<?php
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use Closure;
use Illuminate\Http\Request;
use App\Models\Analytics;
class LogRequest
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
*/
public function handle(Request $request, Closure $next): Response
{
// Make it an after middleware
$response = $next($request);
try {
Analytics::createWithSession([
'type' => 'apirequest',
'attribute' => $request->path(),
'useragent' => $request->userAgent(),
'ip' => $request->ip(),
]);
return $response;
} catch (\Error $e) {
report($e);
return $response;
}
}
}

View File

@@ -1,17 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
class PreventRequestsDuringMaintenance extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@@ -1,32 +0,0 @@
<?php
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param Request $request Request.
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @param string|null ...$guards Guards.
*/
public function handle(Request $request, Closure $next, string ...$guards): Response
{
$guards = empty($guards) === true ? [null] : $guards;
foreach ($guards as $guard) {
if (Auth::guard($guard)->check() === true) {
return redirect(RouteServiceProvider::HOME);
}
}
return $next($request);
}
}

View File

@@ -1,19 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array<int, string>
*/
protected $except = [
'current_password',
'password',
'password_confirmation',
];
}

View File

@@ -1,20 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array<int, string|null>
*/
public function hosts(): array
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

View File

@@ -1,25 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var integer
*/
// @codingStandardsIgnoreStart
protected $headers = (Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB);
// @codingStandardsIgnoreEnd
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class UseSanctumGuard
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
*/
public function handle(Request $request, Closure $next): Response
{
Auth::shouldUse('sanctum');
return $next($request);
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
class ValidateSignature extends Middleware
{
/**
* The names of the query string parameters that should be ignored.
*
* @var array<int, string>
*/
protected $except = [
// 'fbclid',
// 'utm_campaign',
// 'utm_content',
// 'utm_medium',
// 'utm_source',
// 'utm_term',
];
}

View File

@@ -1,17 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@@ -1,35 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Validation\Rule;
class AnalyticsRequest extends BaseRequest
{
/**
* Get the validation rules that apply to POST requests.
*
* @return array<string, mixed>
*/
public function postRules(): array
{
return [
'type' => 'required|string',
];
}
/**
* Get the validation rules that apply to PUT request.
*
* @return array<string, mixed>
*/
public function putRules(): array
{
return [
'type' => 'string',
'useragent' => 'string',
'ip' => 'ipv4|ipv6',
'session' => 'number',
];
}
}

View File

@@ -1,46 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Validation\Rule;
class ArticleRequest extends BaseRequest
{
/**
* Get the validation rules that apply to POST requests.
*
* @return array<string, mixed>
*/
public function postRules(): array
{
return [
'slug' => 'required|string|min:6|unique:articles',
'title' => 'required|string|min:6|max:255',
'publish_at' => 'required|date',
'user_id' => 'required|uuid|exists:users,id',
'content' => 'required|string|min:6',
'hero' => 'required|uuid|exists:media,id',
];
}
/**
* Get the validation rules that apply to PUT request.
*
* @return array<string, mixed>
*/
public function putRules(): array
{
return [
'slug' => [
'string',
'min:6',
Rule::unique('articles')->ignoreModel($this->article),
],
'title' => 'string|min:6|max:255',
'publish_at' => 'date',
'user_id' => 'uuid|exists:users,id',
'content' => 'string|min:6',
'hero' => 'uuid|exists:media,id',
];
}
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AuthLoginRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'email' => 'required|string|min:6|max:255',
'password' => 'required|string|min:6',
];
}
}

View File

@@ -1,96 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class BaseRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
if (request()->isMethod('post') === true && method_exists($this, 'postAuthorize') === true) {
return $this->postAuthorize();
} elseif ((request()->isMethod('put') === true || request()->isMethod('patch') === true) && method_exists($this, 'putAuthorize') === true) {
return $this->putAuthorize();
} elseif (request()->isMethod('delete') === true && method_exists($this, 'destroyAuthorize') === true) {
return $this->deleteAuthorize();
}
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
$rules = [];
if (method_exists($this, 'baseRules') === true) {
$rules = $this->baseRules();
}
if (method_exists($this, 'postRules') === true && request()->isMethod('post') === true) {
$rules = $this->mergeRules($rules, $this->postRules());
} elseif (method_exists($this, 'putRules') === true && (request()->isMethod('put') === true || request()->isMethod('patch') === true)) {
$rules = $this->mergeRules($rules, $this->putRules());
} elseif (method_exists($this, 'destroyRules') === true && request()->isMethod('delete') === true) {
$rules = $this->mergeRules($rules, $this->destroyRules());
}
return $rules;
}
/**
* Merge two collections of rules.
*
* @param array $collection1 The first collection of rules.
* @param array $collection2 The second collection of rules to merge.
*/
private function mergeRules(array $collection1, array $collection2): array
{
$rules = [];
foreach ($collection1 as $key => $ruleset) {
if (array_key_exists($key, $collection2) === true) {
if (is_string($collection1[$key]) === true && is_string($collection2[$key]) === true) {
$rules[$key] = $collection1[$key] . '|' . $collection2[$key];
} else {
$key_ruleset = [];
if (is_array($collection1[$key]) === true) {
$key_ruleset = $collection1[$key];
} elseif (is_string($collection1[$key]) === true) {
$key_ruleset = explode('|', $collection1[$key]);
}
if (is_array($collection2[$key]) === true) {
$key_ruleset = array_merge($key_ruleset, $collection2[$key]);
} elseif (is_string($collection2[$key]) === true) {
$key_ruleset = array_merge($key_ruleset, explode('|', $collection2[$key]));
}
if (count($key_ruleset) > 0) {
$rules[$key] = $key_ruleset;
}
}//end if
} else {
$rules[$key] = $ruleset;
}//end if
}//end foreach
foreach ($collection2 as $key => $ruleset) {
if (array_key_exists($key, $rules) === false) {
$rules[$key] = $collection2[$key];
}
}
return $rules;
}
}

View File

@@ -1,24 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
use Illuminate\Foundation\Http\FormRequest;
class ContactSendRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'name' => 'required|max:255',
'email' => 'required|email|max:255',
'content' => 'required|max:2000',
// 'captcha_token' => [new Recaptcha()],
];
}
}

View File

@@ -1,58 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Validation\Rule;
class EventRequest extends BaseRequest
{
/**
* Apply the base rules to this request
*
* @return array<string, mixed>
*/
public function baseRules(): array
{
return [
'title' => 'min:6',
'location' => [
Rule::in(['online', 'physical']),
],
'address' => 'string|nullable',
'start_at' => 'date',
'end_at' => 'date|after:start_date',
'publish_at' => 'date|nullable',
'status' => [
Rule::in(['draft', 'soon', 'open', 'closed', 'cancelled']),
],
'registration_type' => [
Rule::in(['none', 'email', 'link', 'message']),
],
'registration_data' => [
Rule::when(strcasecmp('email', $this->attributes->get('registration_type')) == 0, 'required|email'),
Rule::when(strcasecmp('link', $this->attributes->get('registration_type')) == 0, 'required|url'),
Rule::when(strcasecmp('message', $this->attributes->get('registration_type')) == 0, 'required|message'),
],
'hero' => 'uuid|exists:media,id',
];
}
/**
* Apply the additional POST base rules to this request
*
* @return array<string, mixed>
*/
protected function postRules(): array
{
return [
'title' => 'required',
'location' => 'required',
'address' => 'required_if:location,physical',
'start_at' => 'required',
'end_at' => 'required',
'status' => 'required',
'registration_type' => 'required',
'hero' => 'required',
];
}
}

View File

@@ -1,8 +0,0 @@
<?php
namespace App\Http\Requests;
class MediaRequest extends BaseRequest
{
/* empty */
}

View File

@@ -1,36 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Validation\Rule;
class ShortlinkRequest extends BaseRequest
{
/**
* Apply the additional POST base rules to this request
*
* @return array<string, mixed>
*/
public function postRules(): array
{
return [
'code' => 'required|string|max:255|min:2|unique:shortlinks',
'url' => 'required|string|max:255|min:2',
];
}
/**
* Get the validation rules that apply to PUT request.
*
* @return array<string, mixed>
*/
public function putRules(): array
{
$shortlink = $this->route('shortlink');
return [
'code' => ['required', 'string', 'max:255', 'min:2', Rule::unique('shortlinks')->ignore($shortlink->id)],
'url' => 'required|string|max:255|min:2',
];
}
}

View File

@@ -1,44 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
class SubscriptionRequest extends BaseRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function postRules(): array
{
return [
'email' => 'required|email|unique:subscriptions',
// 'captcha_token' => [new Recaptcha()],
];
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function destroyRules(): array
{
return [
'email' => 'required|email',
// 'captcha_token' => [new Recaptcha()],
];
}
/**
* Get the custom error messages.
*/
public function messages(): array
{
return [
'email.unique' => 'This email address has already subscribed',
];
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
use Illuminate\Foundation\Http\FormRequest;
class UserForgotPasswordRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'email' => 'required|exists:users,email',
// 'captcha_token' => [new Recaptcha()],
];
}
}

View File

@@ -1,23 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Uniqueish;
use Illuminate\Foundation\Http\FormRequest;
class UserRegisterRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'display_name' => ['required','string','max:255', new Uniqueish('users')],
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:8',
];
}
}

View File

@@ -1,107 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\RequiredIfAny;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\RequiredIf;
use App\Rules\Uniqueish;
use Illuminate\Support\Arr;
class UserRequest extends BaseRequest
{
/**
* Apply the additional POST base rules to this request
*
* @return array<string, mixed>
*/
public function postRules(): array
{
$user = auth()->user();
$isAdminUser = $user->hasPermission('admin/users');
return [
'first_name' => ($isAdminUser === true ? 'required_with:last_name,display_name,phone' : 'required') . '|string|max:255|min:2',
'last_name' => ($isAdminUser === true ? 'required_with:first_name,display_name,phone' : 'required') . '|string|max:255|min:2',
'display_name' => [
$isAdminUser === true ? 'required_with:first_name,last_name,phone' : 'required',
'string',
'max:255',
new Uniqueish('users')
],
'email' => 'required|string|email|max:255|unique:users',
'phone' => ['string', 'regex:/^(\+|00)?[0-9][0-9 \-\(\)\.]{7,32}$/'],
'email_verified_at' => 'date'
];
}
/**
* Get the validation rules that apply to PUT request.
*
* @return array<string, mixed>
*/
public function putRules(): array
{
$user = auth()->user();
$ruleUser = $this->route('user');
$isAdminUser = $user->hasPermission('admin/users');
$requiredIfFieldsPresent = function (array $fields) use ($ruleUser): RequiredIf {
return new RequiredIf(function () use ($fields, $ruleUser) {
$input = $this->all();
$values = Arr::only($input, $fields);
foreach ($values as $key => $value) {
if ($value !== null && $value !== '') {
return true;
}
}
$fields = array_diff($fields, array_keys($values));
foreach ($fields as $field) {
if ($ruleUser->$field !== '') {
return true;
}
}
return false;
});
};
return [
'first_name' => [
'sometimes',
$isAdminUser === true ? $requiredIfFieldsPresent(['last_name', 'display_name', 'phone']) : 'required',
'string',
'between:2,255',
],
'last_name' => [
'sometimes',
$isAdminUser === true ? $requiredIfFieldsPresent(['first_name', 'last_name', 'phone']) : 'required',
'string',
'between:2,255',
],
'display_name' => [
'sometimes',
$isAdminUser === true ? $requiredIfFieldsPresent(['first_name', 'display_name', 'phone']) : 'required',
'string',
'between:2,255',
(new Uniqueish('users', 'display_name'))->ignore($ruleUser->id)
],
'email' => [
'string',
'email',
'max:255',
Rule::unique('users')->ignore($ruleUser->id)->when(
$this->email !== $ruleUser->email,
function ($query) {
return $query->where('email', $this->email);
}
),
],
'phone' => ['nullable', 'regex:/^(\+|00)?[0-9][0-9 \-\(\)\.]{7,32}$/'],
'password' => "nullable|string|min:8"
];
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
use Illuminate\Foundation\Http\FormRequest;
class UserResendVerifyEmailRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'email' => 'required|exists:users,email',
// 'captcha_token' => [new Recaptcha()],
];
}
}

View File

@@ -1,23 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
use Illuminate\Foundation\Http\FormRequest;
class UserResetPasswordRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'code' => 'required|digits:6',
'password' => 'required|string|min:8',
// 'captcha_token' => [new Recaptcha()],
];
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
use Illuminate\Foundation\Http\FormRequest;
class UserVerifyEmailRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'code' => 'required|digits:6',
// 'captcha_token' => [new Recaptcha()],
];
}
}

View File

@@ -0,0 +1,207 @@
<?php
namespace App\Jobs\Media;
use App\Models\Media;
use App\Helpers;
use FFMpeg\Coordinate\TimeCode;
use FFMpeg\FFMpeg;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\Middleware\WithoutOverlapping;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Imagick\Driver;
class GenerateVariants implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Media ID
*
* @var String
*/
public $media_name;
/**
* Overwrite existing
*
* @var bool
*/
public $overwrite;
/**
* Create a new job instance.
*
* @param Media $media The media to process
*/
public function __construct(Media $media, bool $overwrite = true)
{
$this->media_name = $media->name;
$this->overwrite = $overwrite;
}
/**
* Get the middleware the job should pass through.
*
* @return array<int, object>
*/
public function middleware(): array
{
return [new WithoutOverlapping($this->media_name)];
}
/**
* Execute the job.
*/
public function handle(): void
{
$media = Media::find($this->media_name);
if ($media === null) {
return;
}
if(Storage::disk('media')->exists($media->hash) === false) {
return;
}
$variantData = $media->getVariantTypes($matchingMimeType);
if(count($variantData) === 0) {
return;
}
$temp = $media->getAsTempFile();
if($temp === null) {
return;
}
$tempDir = pathinfo($temp, PATHINFO_DIRNAME);
$media->deleteAllVariants();
/* Images */
if($matchingMimeType === 'image/*') {
$manager = new ImageManager(new Driver());
$image = $manager->read($temp);
$isPortrait = $image->height() > $image->width();
foreach ($variantData as $variantName => $size) {
$image = $manager->read($temp);
if($isPortrait === true) {
$width = $size['height'];
$height = $size['width'];
} else {
$width = $size['width'];
$height = $size['height'];
}
if($variantName !== 'scaled' && ($image->height() < $height || $image->width() < $width)) {
continue;
}
$image->scaleDown($width, $height);
$variantFile = $tempDir . '/' . $media->hash . '-' . $variantName . '.webp';
$image->save($variantFile, quality: 75);
$media->addVariant($variantName, 'image/webp', 'webp', $variantFile);
unset($variantFile);
}//end foreach
} else if($matchingMimeType === 'text/plain') {
/* Text */
$width = $variantData['thumbnail']['width'];
$height = $variantData['thumbnail']['height'];
$manager = new ImageManager(new Driver());
$image = $manager->create($width, $height)->fill('fff');
// Read the first few lines of the text file
$numLines = 5;
$text = file_get_contents($temp);
$lines = explode("\n", $text);
$previewText = implode("\n", array_slice($lines, 0, $numLines));
// Center the text on the image
$fontSize = 8;
$textColor = '#000000'; // Black text color
// Calculate the position to start drawing the text
$x = 10; // Left padding
$y = 10; // Top padding
// Draw the text on the canvas with text wrapping
$lines = explode("\n", wordwrap($previewText, 30, "\n", true));
foreach ($lines as $line) {
$image->text($line, $x, $y, function ($font) use ($fontSize, $textColor) {
$font->file(1);
$font->size($fontSize);
$font->color($textColor);
});
// Move to the next line
$y += ($fontSize + 4); // Add some vertical spacing between lines (adjust as needed)
}
$variantFile = $tempDir . '/' . $media->hash . '-thumbnail.webp';
$image->save($variantFile, quality: 75);
$media->addVariant('thumbnail', 'image/webp', 'webp', $variantFile);
unset($variantFile);
} else if($matchingMimeType === 'application/pdf') {
/* PDF */
$width = $variantData['thumbnail']['width'];
$height = $variantData['thumbnail']['height'];
$manager = new ImageManager(new Driver());
$imagick = new \Imagick();
$imagick->readImage($temp . '[0]'); // Read the first page of the PDF
$imagick->setImageFormat('png');
$image = $manager->read($imagick);
$image->scaleDown($width, $height);
$variantFile = $tempDir . '/' . $media->hash . '-thumbnail.webp';
$image->save($variantFile, quality: 75);
$media->addVariant('thumbnail', 'image/webp', 'webp', $variantFile);
unset($variantFile);
} else if($matchingMimeType === 'video/*') {
/* Video */
$tempImage = $tempDir . '/' . $media->hash . '-temp-frame.jpg';
$variantFile = $tempDir . '/' . $media->hash . '-thumbnail.webp';
try {
$ffmpeg = FFMpeg::create();
$video = $ffmpeg->open($temp);
$frame = $video->frame(TimeCode::fromSeconds(5));
$frame->save($tempImage);
$width = $variantData['thumbnail']['width'];
$height = $variantData['thumbnail']['height'];
$manager = new ImageManager(new Driver());
$image = $manager->read($tempImage);
$image->scaleDown($width, $height);
$image->save($variantFile, quality: 75);
$media->addVariant('thumbnail', 'image/webp', 'webp', $variantFile);
unset($variantFile);
} catch (\Exception $e) {
Log::error($e);
}
if(file_exists($tempImage)) {
unlink($tempImage);
}
}
$media->status = 'ready';
$media->save();
}
}

View File

@@ -1,82 +0,0 @@
<?php
namespace App\Jobs;
use App\Models\Media;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Storage;
class MoveMediaJob implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
/**
* Media item
*
* @var Media
*/
public $media;
/**
* New storage ID
*
* @var string
*/
protected $newStorage;
/**
* Create a new job instance.
*
* @param Media $media The media model.
* @param string $newStorage The new storage ID.
* @return void
*/
public function __construct(Media $media, string $newStorage)
{
$this->media = $media;
$this->newStorage = $newStorage;
}
/**
* Execute the job.
*/
public function handle(): void
{
// Don't continue if the media is already on the new storage disk
if ($this->media->storage === $this->newStorage) {
return;
}
$this->media->status = 'Moving file';
$this->media->save();
$files = ["/{$this->media->name}"];
if (empty($this->media->variants) === false) {
foreach ($this->media->variants as $variant => $name) {
$files[] = "/{$name}";
}
}
$this->media->invalidateCFCache();
// Move the files from the old storage disk to the new storage disk
foreach ($files as $file) {
Storage::disk($this->newStorage)->put($file, Storage::disk($this->media->storage)->get($file));
Storage::disk($this->media->storage)->delete($file);
}
// Update the media model with the new storage and save it to the database
$this->media->storage = $this->newStorage;
$this->media->status = 'OK';
$this->media->save();
}
}

View File

@@ -2,20 +2,19 @@
namespace App\Jobs;
use App\Models\SentEmail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
class SendEmailJob implements ShouldQueue
class SendEmail implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Mail to receipt
@@ -31,7 +30,6 @@ class SendEmailJob implements ShouldQueue
*/
public $mailable;
/**
* Create a new job instance.
*
@@ -47,9 +45,23 @@ class SendEmailJob implements ShouldQueue
/**
* Execute the job.
*
* @return void
*/
public function handle(): void
{
// Record sent email
$sentEmail = SentEmail::create([
'recipient' => $this->to,
'mailable_class' => get_class($this->mailable)
]);
// Add unsubscribe link if mailable supports it
if (method_exists($this->mailable, 'withUnsubscribeLink')) {
$unsubscribeLink = route('unsubscribe', ['email' => $sentEmail->id]);
$this->mailable->withUnsubscribeLink($unsubscribeLink);
}
Mail::to($this->to)->send($this->mailable);
}
}

View File

@@ -1,177 +0,0 @@
<?php
namespace App\Jobs;
use App\Models\Media;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use SplFileInfo;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Intervention\Image\Facades\Image;
use Spatie\ImageOptimizer\OptimizerChainFactory;
class StoreUploadedFileJob implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
/**
* Media item
*
* @var Media
*/
protected $media;
/**
* Uploaded file item
*
* @var string
*/
protected $uploadedFilePath;
/**
* Replace existing files
*
* @var string
*/
protected $replaceExisting;
/**
* Create a new job instance.
*
* @param Media $media The media model.
* @param string $filePath The uploaded file.
* @param boolean $replaceExisting Replace existing files.
* @return void
*/
public function __construct(Media $media, string $filePath, bool $replaceExisting = true)
{
$this->media = $media;
$this->uploadedFilePath = $filePath;
$this->replaceExisting = $replaceExisting;
}
/**
* Execute the job.
*/
public function handle(): void
{
$storageDisk = $this->media->storage;
$fileName = $this->media->name;
try {
$this->media->status = "Uploading to CDN";
$this->media->save();
if (strlen($this->uploadedFilePath) > 0) {
if (Storage::disk($storageDisk)->exists($fileName) === false || $this->replaceExisting === true) {
Storage::disk($storageDisk)->putFileAs('/', new SplFileInfo($this->uploadedFilePath), $fileName);
Log::info("uploading file {$storageDisk} / {$fileName} / {$this->uploadedFilePath}");
} else {
Log::info("file {$fileName} already exists in {$storageDisk} / {$this->uploadedFilePath}. Not replacing file and using local {$fileName} for variants.");
}
} else {
if (Storage::disk($storageDisk)->exists($fileName) === true) {
Log::info("file {$fileName} already exists in {$storageDisk} / {$this->uploadedFilePath}. No local {$fileName} for variants, downloading from CDN.");
$readStream = Storage::disk($storageDisk)->readStream($fileName);
$tempFilePath = tempnam(sys_get_temp_dir(), 'download-');
$writeStream = fopen($tempFilePath, 'w');
while (feof($readStream) !== true) {
fwrite($writeStream, fread($readStream, 8192));
}
fclose($readStream);
fclose($writeStream);
$this->uploadedFilePath = $tempFilePath;
} else {
$errorStr = "cannot upload file {$storageDisk} / {$fileName} / {$this->uploadedFilePath} as temp file is empty";
Log::info($errorStr);
throw new \Exception($errorStr);
}
}//end if
if (strpos($this->media->mime_type, 'image/') === 0) {
$this->media->status = "Optimizing image";
$this->media->save();
// Generate additional image sizes
$sizes = Media::getTypeVariants('image');
$originalImage = Image::make($this->uploadedFilePath);
$dimensions = [$originalImage->getWidth(), $originalImage->getHeight()];
$this->media->dimensions = implode('x', $dimensions);
foreach ($sizes as $variantName => $size) {
$postfix = "{$size['width']}x{$size['height']}";
if ($variantName === 'scaled') {
$postfix = 'scaled';
}
if (is_array($this->media->variants) === true && array_key_exists($postfix, $this->media->variants) === true && Storage::disk($storageDisk)->exists($this->media->variants[$postfix]) === true && $this->replaceExisting === true) {
Storage::disk($storageDisk)->delete($this->media->variants[$postfix]);
}
$newFilename = pathinfo($this->media->name, PATHINFO_FILENAME) . "-$postfix.webp";
if (Storage::disk($storageDisk)->exists($newFilename) === false || $this->replaceExisting === true) {
// Get the largest available variant
if ($dimensions[0] >= $size['width'] && $dimensions[1] >= $size['height']) {
// Store the variant in the variants array
$variants[$variantName] = $newFilename;
// Resize the image to the variant size if its dimensions are greater than the specified size
$image = clone $originalImage;
$imageSize = $image->getSize();
if ($imageSize->getWidth() > $size['width'] || $imageSize->getHeight() > $size['height']) {
$image->resize($size['width'], $size['height'], function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
});
$image->resizeCanvas($size['width'], $size['height'], 'center', false, '#FFFFFF');
}
// Optimize and store image
$tempImagePath = tempnam(sys_get_temp_dir(), 'optimize');
$image->encode('webp', 75)->save($tempImagePath);
Storage::disk($storageDisk)->putFileAs('/', new SplFileInfo($tempImagePath), $newFilename);
unlink($tempImagePath);
}//end if
} else {
Log::info("variant {$variantName} already exists for file {$fileName}");
}//end if
}//end foreach
// Set missing variants to the largest available variant
foreach ($sizes as $variantName => $size) {
if (isset($variants[$variantName]) === false) {
$variants[$variantName] = $this->media->name;
}
}
$this->media->variants = $variants;
}//end if
if (strlen($this->uploadedFilePath) > 0) {
unlink($this->uploadedFilePath);
}
$this->media->status = 'OK';
$this->media->save();
} catch (\Exception $e) {
Log::error($e->getMessage());
$this->media->status = "Failed";
$this->media->save();
$this->fail($e);
}//end try
}
}

View File

@@ -0,0 +1,104 @@
<?php
namespace App\Livewire;
use App\Jobs\SendEmail;
use Carbon\Carbon;
use Livewire\Component;
use App\Models\EmailSubscriptions;
use App\Mail\UserWelcome;
class EmailSubscribe extends Component
{
public string $email = '';
public bool $success = false;
public string $message = '';
public string $trap = '';
public int $renderedAt; // unix timestamp
protected $rules = [
'email' => 'required|email|max:255',
];
public function mount()
{
$this->renderedAt = now()->timestamp;
}
public function subscribe(): void
{
$this->validate();
// 1. Honeypot - if this hidden field is filled, treat as success but do nothing
if (! empty($this->trap)) {
$this->reset(['email', 'trap']);
$this->success = true;
$this->message = 'Thanks, you have been subscribed to our newsletter.';
return;
}
// 2. Block submits in first 10 seconds after render
if (now()->timestamp - $this->renderedAt < 4) {
$this->success = false;
$this->message = 'That was a bit quick. Please wait a few seconds and try again.';
return;
}
// 3. Enforce 30 seconds between attempts per session
$lastAttempt = session('subscribe_last_attempt'); // int timestamp or null
if (! is_int($lastAttempt)) {
$lastAttempt = null;
}
$now = time();
if ($lastAttempt && ($now - $lastAttempt) < 20) {
$this->success = false;
$this->message = 'Please wait a little before trying again.';
return;
}
session(['subscribe_last_attempt' => $now]);
// 4. Limit to 5 attempts per session (your existing logic)
$attempts = session('subscribe_attempts', 0);
if ($attempts >= 5) {
$this->success = false;
$this->message = 'Too many attempts. Please try again in a little while.';
return;
}
session(['subscribe_attempts' => $attempts + 1]);
// Look up existing subscription by email
$subscription = EmailSubscriptions::where('email', $this->email)->first();
// If already confirmed, do not create a new record or resend confirmation
if ($subscription && $subscription->confirmed) {
// Optionally you could set a different flag or message here
$this->success = false;
$this->message = 'That email is already subscribed to our newsletter.';
} else {
// If no subscription exists, create a new unconfirmed one
if (!$subscription) {
$subscription = EmailSubscriptions::create([
'email' => $this->email,
'confirmed' => Carbon::now()
]);
$subscription->save();
}
dispatch(new SendEmail($subscription->email, new UserWelcome($subscription->email)))->onQueue('mail');
$this->success = true;
$this->message = 'Thanks, you have been subscribed to our newsletter.';
}
$this->reset(['email', 'trap']);
}
public function render()
{
return view('livewire.email-subscribe');
}
}

View File

@@ -1,75 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ChangeEmailVerify extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The user instance.
*
* @var \App\Models\User
*/
public $user;
/**
* The registration code.
*
* @var integer
*/
public $code;
/**
* The new email address.
*
* @var string
*/
public $new_email;
/**
* Create a new message instance.
*
* @param User $user The user the email applies to.
* @param integer $code The action code.
* @param string $new_email The new email address.
* @return void
*/
public function __construct(User $user, int $code, string $new_email)
{
$this->user = $user;
$this->code = $code;
$this->new_email = $new_email;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '👋🏻 Lets change your email!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.change_email_verify',
text: 'emails.user.change_email_verify_plain',
);
}
}

View File

@@ -1,75 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ChangedEmail extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The user instance.
*
* @var \App\Models\User
*/
public $user;
/**
* The old email.
*
* @var string
*/
public $old_email;
/**
* The new email.
*
* @var string
*/
public $new_email;
/**
* Create a new message instance.
*
* @param User $user The user the email applies to.
* @param string $old_email The previous email address.
* @param string $new_email The new email address.
* @return void
*/
public function __construct(User $user, string $old_email, string $new_email)
{
$this->user = $user;
$this->old_email = $old_email;
$this->new_email = $new_email;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '👍 Your email has been changed!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.changed_email',
text: 'emails.user.changed_email_plain',
);
}
}

View File

@@ -1,57 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ChangedPassword extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The user instance.
*
* @var \App\Models\User
*/
public $user;
/**
* Create a new message instance.
*
* @param User $user The user the email applies to.
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '👍 Your password has been changed!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.changed_password',
text: 'emails.user.changed_password_plain',
);
}
}

View File

@@ -1,74 +0,0 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class Contact extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The contact name.
*
* @var string
*/
public $name;
/**
* The contact email.
*
* @var string
*/
public $email;
/**
* The contact content.
*
* @var string
*/
public $content;
/**
* Create a new message instance.
*
* @param string $name The contact name.
* @param string $email The contact email.
* @param string $content The contact content.
* @return void
*/
public function __construct(string $name, string $email, string $content)
{
$this->name = $name;
$this->email = $email;
$this->content = $content;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: config('contact.contact_subject'),
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.contact',
text: 'emails.user.contact_plain',
);
}
}

View File

@@ -1,66 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class EmailVerify extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The user instance.
*
* @var \App\Models\User
*/
public $user;
/**
* The registration code.
*
* @var integer
*/
public $code;
/**
* Create a new message instance.
*
* @param User $user The user the email applies to.
* @param integer $code The action code.
* @return void
*/
public function __construct(User $user, int $code)
{
$this->user = $user;
$this->code = $code;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '👋🏻 Welcome to STEMMechanics!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.email_verify',
text: 'emails.user.email_verify_plain',
);
}
}

View File

@@ -1,66 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ForgotPassword extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The user
*
* @var \App\Models\User
*/
public $user;
/**
* The reset code
*
* @var integer
*/
public $code;
/**
* Create a new message instance.
*
* @param User $user The user the email applies to.
* @param integer $code The action code.
* @return void
*/
public function __construct(User $user, int $code)
{
$this->user = $user;
$this->code = $code;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '🤦 Forgot your password?',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.forgot_password',
text: 'emails.user.forgot_password_plain',
);
}
}

View File

@@ -1,57 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class SubscriptionConfirm extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The email address.
*
* @var string
*/
public $email;
/**
* Create a new message instance.
*
* @param string $email The email address.
* @return void
*/
public function __construct(string $email)
{
$this->email = $email;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: '🗞️ You\'re on the mailing list!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.subscription_confirm',
text: 'emails.user.subscription_confirm_plain',
);
}
}

View File

@@ -1,57 +0,0 @@
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class SubscriptionUnsubscribed extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The email address.
*
* @var string
*/
public $email;
/**
* Create a new message instance.
*
* @param string $email The email address.
* @return void
*/
public function __construct(string $email)
{
$this->email = $email;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'You have been unsubscribed',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.user.subscription_unsubscribed',
text: 'emails.user.subscription_unsubscribed_plain',
);
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Mail;
use App\Models\Workshop;
use App\Traits\HasUnsubscribeLink;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Carbon;
class UpcomingWorkshops extends Mailable
{
use Queueable, SerializesModels, HasUnsubscribeLink;
public $subject;
public $email;
public $workshops;
public function __construct($email, $subject = 'Upcoming Workshops 🌟')
{
$this->subject = $subject;
$this->email = $email;
$this->workshops = $this->getUpcomingWorkshops();
}
private function getUpcomingWorkshops()
{
$startDate = Carbon::now()->addDays(3);
$endDate = Carbon::now()->addDays(42);
return Workshop::select('workshops.*', 'locations.name as location_name')
->join('locations', 'workshops.location_id', '=', 'locations.id')
->whereIn('workshops.status', ['open','scheduled'])
->whereBetween('workshops.starts_at', [$startDate, $endDate])
->where('locations.name', 'not like', '%private%')
->orderBy('locations.name')
->orderBy('workshops.starts_at')
->get();
}
public function build()
{
// Bail if there are no upcoming workshops
if ($this->workshops->isEmpty()) {
return false;
}
return $this
->subject($this->subject)
->markdown('emails.upcoming-workshops')
->with([
'email' => $this->email,
'workshops' => $this->workshops,
'unsubscribeLink' => $this->unsubscribeLink
]);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class UserEmailUpdateConfirm extends Mailable
{
use Queueable, SerializesModels;
public $email;
public function __construct($email)
{
$this->email = $email;
}
public function build()
{
return $this
->subject('Your STEMMechanics account has been updated 👍')
->markdown('emails.email-update-confirm')
->with([
'email' => $this->email,
]);
}
}

Some files were not shown because too many files have changed in this diff Show More