mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 10:43:48 +00:00
Compare commits
1001 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac9233ce2c | ||
|
|
1afa5fa48e | ||
|
|
6c8a4e2186 | ||
|
|
b38a8f5450 | ||
|
|
5505006d1b | ||
|
|
7db1c7926f | ||
|
|
d1ecd33838 | ||
|
|
49abb58776 | ||
|
|
d8f1f57b89 | ||
|
|
dba177d7f3 | ||
|
|
46971e0765 | ||
|
|
c9e1fcbd3c | ||
|
|
f87fef13cd | ||
|
|
1bc3164a5d | ||
|
|
c323677cfa | ||
|
|
bc5300ad6d | ||
|
|
04b965fd83 | ||
|
|
42ccd553d6 | ||
|
|
b79184bee1 | ||
|
|
751cc6db1b | ||
|
|
245bef8d10 | ||
|
|
132bf23a7e | ||
|
|
ab970ef056 | ||
|
|
b8e97b62c1 | ||
|
|
829e4ec789 | ||
|
|
4c52b6a627 | ||
|
|
e01fc99ef4 | ||
|
|
1ba96f0c43 | ||
|
|
b6c603a97b | ||
|
|
45844f26d3 | ||
|
|
7b4cb694f3 | ||
|
|
8bc046fc73 | ||
|
|
ec5ed24eaa | ||
|
|
22e096cf24 | ||
|
|
f2f18f3063 | ||
|
|
4cafb726df | ||
|
|
e274088b71 | ||
|
|
178a8606b9 | ||
|
|
a26684df79 | ||
|
|
42390af2d5 | ||
|
|
06ee3faa1e | ||
|
|
74898d007f | ||
|
|
ba1fb5aa0b | ||
|
|
afe0a21a29 | ||
|
|
7983195223 | ||
|
|
13d0a5feba | ||
|
|
7fff722377 | ||
|
|
e412f3b88b | ||
|
|
0485672a47 | ||
|
|
ca89117c77 | ||
|
|
2ad5e66831 | ||
|
|
df3303b527 | ||
|
|
aedd6d9120 | ||
|
|
ad02c87f19 | ||
|
|
c9c7a730f6 | ||
|
|
c7ccecf447 | ||
|
|
a4bdb74951 | ||
|
|
dedbc85e57 | ||
|
|
aaea435eb0 | ||
|
|
cd912945cf | ||
|
|
447535bd26 | ||
|
|
38854be63c | ||
|
|
8ec2d5402b | ||
|
|
a61d8434be | ||
|
|
918c0a6fe9 | ||
|
|
ebf1b16aa5 | ||
|
|
119780317d | ||
|
|
9bc8a9b27c | ||
|
|
f3bfe9a0cc | ||
|
|
40b746fb78 | ||
|
|
8a943747eb | ||
|
|
59e3f55ac3 | ||
|
|
16db8d3512 | ||
|
|
d521b237a3 | ||
|
|
3077ec18d1 | ||
|
|
8b5b9c3310 | ||
|
|
c4d7fa1e9b | ||
|
|
96afda9f7c | ||
|
|
97060092ba | ||
|
|
3a73e4c792 | ||
|
|
2e798bd1ec | ||
|
|
94afb626eb | ||
|
|
428b4c87a3 | ||
|
|
c912166905 | ||
|
|
aa9731dd13 | ||
|
|
05f58e1468 | ||
|
|
7659cc7221 | ||
|
|
a4b18c26b5 | ||
|
|
317d7aefc3 | ||
|
|
17d4bcd888 | ||
|
|
8dd4cf2be6 | ||
|
|
b8a50bb326 | ||
|
|
d8789a4788 | ||
|
|
1d670fcb52 | ||
|
|
b9975de700 | ||
|
|
31218240ae | ||
|
|
36c5e51b4f | ||
|
|
4e2f92ee7a | ||
|
|
d6e9d2bd4f | ||
|
|
971ae4160e | ||
|
|
63da860df5 | ||
|
|
ab65aa8859 | ||
|
|
6bd1ec96bd | ||
|
|
8bab827d81 | ||
|
|
1d91d9759e | ||
|
|
127f1dc4cf | ||
|
|
1e10ff32a8 | ||
|
|
aa30b519fa | ||
|
|
3c28da2613 | ||
|
|
e87e2ec4e3 | ||
|
|
f66982b3ec | ||
|
|
68dc04963d | ||
|
|
69a48e8925 | ||
|
|
c0e431b384 | ||
|
|
b8741439f5 | ||
|
|
70901a2df5 | ||
|
|
d2371e667f | ||
|
|
000b5459f9 | ||
|
|
ed17ed1a79 | ||
|
|
8c75166980 | ||
|
|
6472997cc1 | ||
|
|
209667f55e | ||
|
|
73c84075c5 | ||
|
|
5d7fed7de8 | ||
|
|
b6cf1e2799 | ||
|
|
acfbbd56ca | ||
|
|
b9a6bc05ff | ||
|
|
e3293f0b1a | ||
|
|
4eb901dae0 | ||
|
|
911f15d493 | ||
|
|
a43c799d59 | ||
|
|
e9824bb807 | ||
|
|
2c933c65a7 | ||
|
|
0b2d05a899 | ||
|
|
4e2ac2b890 | ||
|
|
6bd7456f2e | ||
|
|
bbd6df4175 | ||
|
|
70fe106e45 | ||
|
|
1331409920 | ||
|
|
01970af8de | ||
|
|
63a72d6fe4 | ||
|
|
9b5f8731d2 | ||
|
|
4250e58370 | ||
|
|
f9b762de43 | ||
|
|
67b9f7f4dc | ||
|
|
cf7e17e188 | ||
|
|
137021fcdc | ||
|
|
3d2e279afd | ||
|
|
4fc5ccd26d | ||
|
|
89e4ae6737 | ||
|
|
8b3f76d1d0 | ||
|
|
37cc94aeda | ||
|
|
664f8d8e53 | ||
|
|
b1fd046084 | ||
|
|
e8fb5b6865 | ||
|
|
9ed2eec092 | ||
|
|
257de10cc8 | ||
|
|
2e61cee49c | ||
|
|
aca289b5a6 | ||
|
|
0f42704980 | ||
|
|
4f9fb3991c | ||
|
|
f75c20e5a7 | ||
|
|
c2d53479e8 | ||
|
|
89689816ad | ||
|
|
ba58e76d3b | ||
|
|
12d7b3e92b | ||
|
|
c8ebb5db9f | ||
|
|
869dbd4797 | ||
|
|
4b8bd3be52 | ||
|
|
a4aa329bf4 | ||
|
|
97a807a5e5 | ||
|
|
92561d137d | ||
|
|
43368c7555 | ||
|
|
5e9e4142d0 | ||
|
|
7be7203b96 | ||
|
|
0adc0f4fcd | ||
|
|
110a22d317 | ||
|
|
68b4722668 | ||
|
|
612298ebec | ||
|
|
48492f87be | ||
|
|
01735b4e1f | ||
|
|
e769c33af6 | ||
|
|
b635a17644 | ||
|
|
954f0e3361 | ||
|
|
6a9fa9ceec | ||
|
|
20162ac366 | ||
|
|
0a9740a363 | ||
|
|
4b366747b6 | ||
|
|
c2595a0de4 | ||
|
|
6e8714aec5 | ||
|
|
5e86799a82 | ||
|
|
d586eb9d7e | ||
|
|
35d89e2be1 | ||
|
|
409ab8c03f | ||
|
|
8be0ae2a62 | ||
|
|
d43efad45e | ||
|
|
c86f93ac1e | ||
|
|
64b0dff8fb | ||
|
|
ca76463fab | ||
|
|
e4dd9de931 | ||
|
|
dc8e3c8141 | ||
|
|
97ef846a44 | ||
|
|
5b130d01af | ||
|
|
552e5e02c9 | ||
|
|
19e29e69e0 | ||
|
|
ad8793ce28 | ||
|
|
6c3e7801da | ||
|
|
50eb67ac79 | ||
|
|
cd5af37bfe | ||
|
|
338f8664b7 | ||
|
|
6a4bfa8bfe | ||
|
|
b439fc1070 | ||
|
|
8baa466782 | ||
|
|
8df7794484 | ||
|
|
e71810a9bb | ||
|
|
b37bbe38dc | ||
|
|
a051ab568d | ||
|
|
ab2c8b8371 | ||
|
|
b803c32b41 | ||
|
|
5d1d883fb1 | ||
|
|
e5f4bad9a9 | ||
|
|
fbc9eed30b | ||
|
|
7740e1673f | ||
|
|
9de6c65643 | ||
|
|
9a15f2ecd8 | ||
|
|
86090d5192 | ||
|
|
6ed2efcc4e | ||
|
|
85d4f535eb | ||
|
|
03d78937dc | ||
|
|
596fa5f95c | ||
|
|
8d1ee24c7a | ||
|
|
d71e598758 | ||
|
|
18ffb24941 | ||
|
|
f5879c0670 | ||
|
|
60a3c46ffe | ||
|
|
76b32f551f | ||
|
|
03d42bee51 | ||
|
|
e240ce7736 | ||
|
|
93dbaa081d | ||
|
|
eb48aa46e3 | ||
|
|
7bd1079ce9 | ||
|
|
ade6b05bd0 | ||
|
|
7e0913b363 | ||
|
|
736a809e83 | ||
|
|
4379daa079 | ||
|
|
9a11af3b39 | ||
|
|
4ae4e70fe4 | ||
|
|
657248aa43 | ||
|
|
b0f1bb46d7 | ||
|
|
490fe5a120 | ||
|
|
953e7892b7 | ||
|
|
34bd1d3a3c | ||
|
|
8035ea2b23 | ||
|
|
993dfc8fa1 | ||
|
|
3649b6b7cf | ||
|
|
23fdab0f68 | ||
|
|
736174fda7 | ||
|
|
4e9c40d7ed | ||
|
|
10d8b592ea | ||
|
|
9f783fcd95 | ||
|
|
d386f70be8 | ||
|
|
2c86c62d7f | ||
|
|
4e9e8c47c0 | ||
|
|
ba308fa70a | ||
|
|
e8a0c421e9 | ||
|
|
bf6bc17d7d | ||
|
|
80b2371868 | ||
|
|
3d9272b05e | ||
|
|
2fa73dc3d2 | ||
|
|
b219c00113 | ||
|
|
c1f775975d | ||
|
|
a3805b4bff | ||
|
|
be37f95404 | ||
|
|
086dab99cd | ||
|
|
2d4c7241ef | ||
|
|
d4199a796d | ||
|
|
e4d44fc5eb | ||
|
|
40b13acbb9 | ||
|
|
b1160a1327 | ||
|
|
9cfe6118a9 | ||
|
|
64dbcf287d | ||
|
|
bfe4c257a2 | ||
|
|
1615be340a | ||
|
|
2ce165dd65 | ||
|
|
c5bfd99df7 | ||
|
|
182451515c | ||
|
|
ff476251f5 | ||
|
|
ef9f654834 | ||
|
|
ab042cc4b3 | ||
|
|
3f8fc1c9ce | ||
|
|
dff804153e | ||
|
|
d362b37cd3 | ||
|
|
621f6770c5 | ||
|
|
d1d58711c5 | ||
|
|
36883d1c0d | ||
|
|
0ca67c2348 | ||
|
|
0fbb8fd8ee | ||
|
|
b0829c71e9 | ||
|
|
af3f08e728 | ||
|
|
32d4873715 | ||
|
|
b8a1390220 | ||
|
|
9d4d1ba9aa | ||
|
|
8c59501907 | ||
|
|
ed67927672 | ||
|
|
e604c8e4fd | ||
|
|
4ea76419db | ||
|
|
8d13d82af9 | ||
|
|
6ee142b58c | ||
|
|
5964bebad2 | ||
|
|
6a48beb793 | ||
|
|
bbd8e70c9d | ||
|
|
e232543ea4 | ||
|
|
62c6331845 | ||
|
|
43f2a43d6c | ||
|
|
c5810e962b | ||
|
|
d7d95e22ea | ||
|
|
8c1e59d81a | ||
|
|
3c1c6eb5b9 | ||
|
|
df05eb0433 | ||
|
|
bb1d775585 | ||
|
|
7f49ae011c | ||
|
|
a608678bb9 | ||
|
|
aa515b5450 | ||
|
|
87466e4596 | ||
|
|
3f01dd3f95 | ||
|
|
5531be6640 | ||
|
|
1d144d6c9e | ||
|
|
b043878eed | ||
|
|
a2d0b26b68 | ||
|
|
381a440c61 | ||
|
|
95efdc3993 | ||
|
|
dece343d8b | ||
|
|
5d15f3da51 | ||
|
|
42245317f4 | ||
|
|
73ef6e6c1f | ||
|
|
881facc867 | ||
|
|
98d9f3ab0d | ||
|
|
7564c01fa3 | ||
|
|
1ad8fbdd57 | ||
|
|
10f37e645b | ||
|
|
ca883a6f93 | ||
|
|
0d59fe5b8e | ||
|
|
fea2d839e7 | ||
|
|
0c334f5daf | ||
|
|
87bcd50e44 | ||
|
|
01588fa06b | ||
|
|
e8f59ef0a9 | ||
|
|
9c040cfe48 | ||
|
|
4b899d8f29 | ||
|
|
e8c3fd74b1 | ||
|
|
1d1e6823c7 | ||
|
|
bc197cbb5e | ||
|
|
9a6abbd6e8 | ||
|
|
60407f9dce | ||
|
|
9d955799d3 | ||
|
|
4bab179e17 | ||
|
|
aa5742dafa | ||
|
|
f6f4184fb2 | ||
|
|
f6ea18fce2 | ||
|
|
a544578b38 | ||
|
|
5fa205de27 | ||
|
|
806af9da5c | ||
|
|
dfeef6fdf8 | ||
|
|
d0b4b729c9 | ||
|
|
1c4b4c6279 | ||
|
|
556f6d0813 | ||
|
|
3f4263393e | ||
|
|
a51dece5ee | ||
|
|
a7db1a22d2 | ||
|
|
ee80f454fb | ||
|
|
2c4175b708 | ||
|
|
fe3fbe7db7 | ||
|
|
3c35ea9a4e | ||
|
|
f835c6a7c2 | ||
|
|
5e48af22a2 | ||
|
|
2bba6dc051 | ||
|
|
ab03b471f7 | ||
|
|
9e973b89ce | ||
|
|
0e45092795 | ||
|
|
c1ace2854f | ||
|
|
4e471cb077 | ||
|
|
ffa4f67cbd | ||
|
|
8e4fc55b23 | ||
|
|
ee516fd384 | ||
|
|
da27c47d7a | ||
|
|
28d99cce78 | ||
|
|
0905a0660c | ||
|
|
d02ca13197 | ||
|
|
9ae2d54a5e | ||
|
|
64e80d387b | ||
|
|
70d7f2f5bd | ||
|
|
4315cddcb2 | ||
|
|
26f7cdb80f | ||
|
|
8495ed5422 | ||
|
|
2a0b01e888 | ||
|
|
6ebf5dc3cb | ||
|
|
dd1f3b299d | ||
|
|
4e2155b75a | ||
|
|
c0ca83193f | ||
|
|
08175d4dba | ||
|
|
e6043e4530 | ||
|
|
bf62c007ac | ||
|
|
1cf50206cb | ||
|
|
9bc0ce3c3d | ||
|
|
2fa0b5cd77 | ||
|
|
241190104e | ||
|
|
23054c2257 | ||
|
|
1e4649eec2 | ||
|
|
81f227c5e7 | ||
|
|
5829eaacc4 | ||
|
|
e0e488860d | ||
|
|
2c90db8e04 | ||
|
|
0a30ca0b98 | ||
|
|
ae138bb4d4 | ||
|
|
ad5b741feb | ||
|
|
cad1a1680c | ||
|
|
0f6dd0304f | ||
|
|
2724fb1873 | ||
|
|
0f4b80ddac | ||
|
|
6155173d82 | ||
|
|
6ca2269c80 | ||
|
|
4b751a29c2 | ||
|
|
ff9198a03e | ||
|
|
0c0a2424b7 | ||
|
|
a3abfd670a | ||
|
|
90303458a0 | ||
|
|
3f0a69a062 | ||
|
|
a303ffffdc | ||
|
|
64d1883f53 | ||
|
|
071bdc1bcd | ||
|
|
30025271c2 | ||
|
|
8ae24a9a6e | ||
|
|
dee1614297 | ||
|
|
c2e4b50df5 | ||
|
|
2e80da830a | ||
|
|
c84850e8d2 | ||
|
|
6fd8ddf680 | ||
|
|
ab3a307dc1 | ||
|
|
c3a6f5d703 | ||
|
|
293eb679fa | ||
|
|
45dcdcce16 | ||
|
|
a589ee5f7a | ||
|
|
06b28aeee3 | ||
|
|
047b907c60 | ||
|
|
eb7b319ebd | ||
|
|
aef715e061 | ||
|
|
fdfb5f57d7 | ||
|
|
0501e3e3d5 | ||
|
|
efb0fc4734 | ||
|
|
f15c81d342 | ||
|
|
6feadfd188 | ||
|
|
ee67b8050d | ||
|
|
c3398f0da4 | ||
|
|
171ee5fa04 | ||
|
|
1107bf66af | ||
|
|
5be55b52bd | ||
|
|
6db8b0662a | ||
|
|
45a3b5415b | ||
|
|
394a7b6baf | ||
|
|
3fafc811fe | ||
|
|
5ee77da25f | ||
|
|
421388b360 | ||
|
|
8828432e4d | ||
|
|
820f0b3890 | ||
|
|
b897eaf482 | ||
|
|
da74a38605 | ||
|
|
00c6562719 | ||
|
|
4498461e70 | ||
|
|
948c7453a6 | ||
|
|
eb948f9000 | ||
|
|
3fd43936e7 | ||
|
|
03730b80c0 | ||
|
|
3867c9cd67 | ||
|
|
b5c00e98df | ||
|
|
9f5172da85 | ||
|
|
a6940379cb | ||
|
|
a9e4daed35 | ||
|
|
e7d9fca9c2 | ||
|
|
638a1a9a72 | ||
|
|
4df575f5e9 | ||
|
|
7b0f9a19de | ||
|
|
f04c057490 | ||
|
|
09774b1d48 | ||
|
|
81362fef2d | ||
|
|
58fae35085 | ||
|
|
21e184f373 | ||
|
|
38e86b4b8b | ||
|
|
6980c28c57 | ||
|
|
e794ef5c17 | ||
|
|
f8317e761b | ||
|
|
5a28eeef1e | ||
|
|
cad8c31422 | ||
|
|
78f69ca816 | ||
|
|
bb9280d050 | ||
|
|
b751429dc5 | ||
|
|
45a46bbc65 | ||
|
|
b38b532cbe | ||
|
|
5ae875233b | ||
|
|
2ca42f530b | ||
|
|
dcba1e8407 | ||
|
|
854ae6d8fd | ||
|
|
940a2de13d | ||
|
|
42c2ffc274 | ||
|
|
0c71329dee | ||
|
|
f74bb7cec5 | ||
|
|
d855739bf2 | ||
|
|
a2726ae2c5 | ||
|
|
0b3fc946bd | ||
|
|
d16d73680f | ||
|
|
438e930e06 | ||
|
|
737fb7f32f | ||
|
|
e22ae97a87 | ||
|
|
fb91c1883a | ||
|
|
3652c64738 | ||
|
|
3d32e8f7e0 | ||
|
|
995319cfe5 | ||
|
|
1085062d10 | ||
|
|
8b1a3f0476 | ||
|
|
630cefee41 | ||
|
|
5725753052 | ||
|
|
ec92295fbf | ||
|
|
87dbcbceb8 | ||
|
|
3677e51c8f | ||
|
|
4396965d4d | ||
|
|
4319533873 | ||
|
|
1c16f0001c | ||
|
|
1f48abae0f | ||
|
|
a7fd410a68 | ||
|
|
f5e45126db | ||
|
|
fc74682e62 | ||
|
|
26bf65af88 | ||
|
|
ba05cdde83 | ||
|
|
e2cfdd5345 | ||
|
|
6cb2a1bb9a | ||
|
|
aa28118d75 | ||
|
|
c2667ab481 | ||
|
|
03e4f98ad6 | ||
|
|
4fc61afc11 | ||
|
|
6b71eabfa2 | ||
|
|
bb4f66f159 | ||
|
|
7f33df62a5 | ||
|
|
e1de316774 | ||
|
|
34fcbdc55c | ||
|
|
24edb85b24 | ||
|
|
1342dfa20f | ||
|
|
5adf9bd2be | ||
|
|
ea59624091 | ||
|
|
89e886b40c | ||
|
|
09449539fa | ||
|
|
c711150793 | ||
|
|
509fb32c81 | ||
|
|
763e63db55 | ||
|
|
b456a562a0 | ||
|
|
148f5982a9 | ||
|
|
59414a1e31 | ||
|
|
ffebe7fecc | ||
|
|
2403f89ca3 | ||
|
|
97b429f8d1 | ||
|
|
ec83c0e018 | ||
|
|
51701214a2 | ||
|
|
7dd116a769 | ||
|
|
7e9e9ee25b | ||
|
|
662ba988a0 | ||
|
|
5c59296724 | ||
|
|
703a49711c | ||
|
|
1d0ba4d679 | ||
|
|
ceba8f5cc1 | ||
|
|
8eff3969d3 | ||
|
|
7b3bd1135c | ||
|
|
e77e0cda03 | ||
|
|
8d67d089bf | ||
|
|
d4220254db | ||
|
|
4fa93512b5 | ||
|
|
66de377657 | ||
|
|
6cf7e5d26d | ||
|
|
3b34dc43ce | ||
|
|
d498446911 | ||
|
|
4feba76f57 | ||
|
|
e1bb4b2cbe | ||
|
|
53a2950dd3 | ||
|
|
68563b9e10 | ||
|
|
1c188081b3 | ||
|
|
62cbcd14ed | ||
|
|
9dbc3ab969 | ||
|
|
ca48d430bb | ||
|
|
08139c8f96 | ||
|
|
5de2b8b0e0 | ||
|
|
26aa8b46df | ||
|
|
0d8f1b64a7 | ||
|
|
ead4f65e1a | ||
|
|
8a64fe070b | ||
|
|
f017be476f | ||
|
|
0b5fcfe676 | ||
|
|
a2e6a3bd2f | ||
|
|
e823e57c71 | ||
|
|
a113fffbf0 | ||
|
|
10c25cf9d5 | ||
|
|
6a957fa9fc | ||
|
|
5d2071ea91 | ||
|
|
e892e0e94f | ||
|
|
8b7a80e10d | ||
|
|
86dac75071 | ||
|
|
31ec9b4fda | ||
|
|
21b838eda4 | ||
|
|
e5e713659e | ||
|
|
8d53ed1531 | ||
|
|
05f6023053 | ||
|
|
29a954e21b | ||
|
|
ec29764c3f | ||
|
|
b4887cea0e | ||
|
|
c7c11fe5b9 | ||
|
|
49c6f25acb | ||
|
|
3b4085f0ca | ||
|
|
09d8b84870 | ||
|
|
9d189b3d12 | ||
|
|
2363592dcd | ||
|
|
22733619d1 | ||
|
|
4ab5e17068 | ||
|
|
50abdc3266 | ||
|
|
6f5b3c05ad | ||
|
|
aa8851aacb | ||
|
|
0cc3285ee9 | ||
|
|
6ec3c88690 | ||
|
|
88948af6d9 | ||
|
|
da69898051 | ||
|
|
47e834c368 | ||
|
|
0194e546fd | ||
|
|
f88ed999c5 | ||
|
|
606765561d | ||
|
|
b1cb7be678 | ||
|
|
6bb7789232 | ||
|
|
60b34e53a3 | ||
|
|
f5e182baf6 | ||
|
|
dc0dedffea | ||
|
|
56a5bfd483 | ||
|
|
534d474307 | ||
|
|
22ae148a22 | ||
|
|
e5a2be112b | ||
|
|
401b511b40 | ||
|
|
afb8323541 | ||
|
|
04e46b7fcb | ||
|
|
f37c4f62b7 | ||
|
|
27753f30ad | ||
|
|
b4dfbd1623 | ||
|
|
b368d56bbc | ||
|
|
6cb3503870 | ||
|
|
bb7831f717 | ||
|
|
43738bf8db | ||
|
|
d8a33703ab | ||
|
|
86eee2f533 | ||
|
|
342d07126a | ||
|
|
5439ba1aae | ||
|
|
42487d43f1 | ||
|
|
9275487cfa | ||
|
|
26f367031e | ||
|
|
e645eebc4d | ||
|
|
5382da0b1f | ||
|
|
c6b4a767da | ||
|
|
78a6cf0c92 | ||
|
|
9e4de3657e | ||
|
|
2d0a166ad7 | ||
|
|
17a40ea808 | ||
|
|
0179dcb068 | ||
|
|
7d685fa166 | ||
|
|
8242ba860f | ||
|
|
dd3e477593 | ||
|
|
b08662b307 | ||
|
|
de047f7dd8 | ||
|
|
ca257ae113 | ||
|
|
c7c81dda34 | ||
|
|
e5322d6c2e | ||
|
|
067c123aa8 | ||
|
|
751ebcb7eb | ||
|
|
69e167a337 | ||
|
|
7f0d00017f | ||
|
|
d80fa81f36 | ||
|
|
fa3cb93b19 | ||
|
|
5d4486a4ad | ||
|
|
8456aaf01e | ||
|
|
459087337c | ||
|
|
5626a054da | ||
|
|
64e8bccb31 | ||
|
|
16823b9566 | ||
|
|
13287ce6b0 | ||
|
|
7f6598238e | ||
|
|
3bfca2ac83 | ||
|
|
03ddb61d33 | ||
|
|
d8f1f396d5 | ||
|
|
936af4497b | ||
|
|
2fb3cff98b | ||
|
|
4e069b98f6 | ||
|
|
9503ecbd79 | ||
|
|
f71a31ab78 | ||
|
|
be04715f8b | ||
|
|
8ff3b408cc | ||
|
|
b447d2ea83 | ||
|
|
7fe576ba26 | ||
|
|
913bdf70ad | ||
|
|
f711ec7d89 | ||
|
|
946dfa7d99 | ||
|
|
c5aadd3c6e | ||
|
|
884c36a5a3 | ||
|
|
b6c77a6685 | ||
|
|
21d75678c0 | ||
|
|
78541c1c3c | ||
|
|
0ad8afcfe2 | ||
|
|
d958da933d | ||
|
|
d039700b90 | ||
|
|
4ea46f5e81 | ||
|
|
88234d5748 | ||
|
|
6dd40df7d5 | ||
|
|
79281e80f6 | ||
|
|
67bbc79f20 | ||
|
|
d798f06d36 | ||
|
|
9cece789a0 | ||
|
|
054c0eb32c | ||
|
|
a2e0c1810d | ||
|
|
d16a37f2ed | ||
|
|
0a4d5dea8a | ||
|
|
8faa865fb7 | ||
|
|
6ca84d9041 | ||
|
|
4851fb5eab | ||
|
|
7c5cb79677 | ||
|
|
496a6ea5a7 | ||
|
|
f402141bfb | ||
|
|
34eaf3e411 | ||
|
|
6514102df2 | ||
|
|
c7dab4b268 | ||
|
|
8387467ee7 | ||
|
|
9744344146 | ||
|
|
a5b8744082 | ||
|
|
eb22f25b07 | ||
|
|
0cc39f8575 | ||
|
|
9d52da4e3a | ||
|
|
18ff8a6dc7 | ||
|
|
1f5f0a7fbb | ||
|
|
73cd950054 | ||
|
|
5c12334d92 | ||
|
|
8b5e5fecfb | ||
|
|
77d14a9d80 | ||
|
|
02582f2ae3 | ||
|
|
d600ee7830 | ||
|
|
8d8fdbf9ba | ||
|
|
de9d91da62 | ||
|
|
29cb889283 | ||
|
|
ee86fbbe66 | ||
|
|
aec5b98313 | ||
|
|
5a9f2985c9 | ||
|
|
cdaad931bb | ||
|
|
98823504ba | ||
|
|
6203581893 | ||
|
|
f139dbae08 | ||
|
|
dc8ec5f20b | ||
|
|
9b2dbe06c7 | ||
|
|
23602f5e4f | ||
|
|
b232701783 | ||
|
|
54167ae366 | ||
|
|
ffbf809b1e | ||
|
|
bf4d860bb8 | ||
|
|
4e86e7dd4b | ||
|
|
60a2a88805 | ||
|
|
e6133d6071 | ||
|
|
1e515ede88 | ||
|
|
57506fc34f | ||
|
|
06bb51989e | ||
|
|
b1a6fc3bf2 | ||
|
|
351d57b103 | ||
|
|
2d7b6e4e05 | ||
|
|
ce846cc076 | ||
|
|
0f08d9fe38 | ||
|
|
d018dcba06 | ||
|
|
ceb1e5c9dd | ||
|
|
b53d9fb93a | ||
|
|
240880e2ad | ||
|
|
3dfee77042 | ||
|
|
9c26c764bd | ||
|
|
407f2d2874 | ||
|
|
cd44274690 | ||
|
|
265cc393e1 | ||
|
|
21d6410f76 | ||
|
|
e3ddf27023 | ||
|
|
15e154176d | ||
|
|
6ef50978d5 | ||
|
|
54af098148 | ||
|
|
fda82d6dbf | ||
|
|
d4990d8d5f | ||
|
|
524791f251 | ||
|
|
b45662942d | ||
|
|
3f93373f60 | ||
|
|
018b973c0f | ||
|
|
133dd5285d | ||
|
|
3ec5166936 | ||
|
|
69fccfeaad | ||
|
|
c9631a9727 | ||
|
|
841c1db54a | ||
|
|
705281325f | ||
|
|
cea881ce38 | ||
|
|
3fee035e9e | ||
|
|
2aac3fc966 | ||
|
|
07b249346b | ||
|
|
37cad85a86 | ||
|
|
19cc01131b | ||
|
|
d40108f6a9 | ||
|
|
f715cd897f | ||
|
|
a9556896ca | ||
|
|
1db153aeef | ||
|
|
6f9b6835a7 | ||
|
|
d1cb1a378b | ||
|
|
c916916a4d | ||
|
|
a3516769de | ||
|
|
f44e262d6e | ||
|
|
ac62a432fe | ||
|
|
2bfdf5c311 | ||
|
|
e751a6bc90 | ||
|
|
eb38ca8c9a | ||
|
|
4304fb1ddb | ||
|
|
7984ce3ef1 | ||
|
|
d299183ecd | ||
|
|
174f2a2c1f | ||
|
|
e0e060e5a1 | ||
|
|
5c6a873b02 | ||
|
|
f5f2179145 | ||
|
|
bee7352b28 | ||
|
|
7020720392 | ||
|
|
8282defbe3 | ||
|
|
49c147f609 | ||
|
|
dfa82535eb | ||
|
|
bcfe813e1e | ||
|
|
78bf913d92 | ||
|
|
0c6621494e | ||
|
|
e0ecfce382 | ||
|
|
80a86bbddd | ||
|
|
60f0f3c329 | ||
|
|
d53a4964ae | ||
|
|
ca1d037975 | ||
|
|
fdd9c5a591 | ||
|
|
d4e3957598 | ||
|
|
f24d57d88d | ||
|
|
fd313e3d83 | ||
|
|
527a0790e3 | ||
|
|
42210233dc | ||
|
|
cc0436b8f3 | ||
|
|
a926545146 | ||
|
|
26e3194f21 | ||
|
|
882b5543f0 | ||
|
|
1f529ae7e0 | ||
|
|
a6e60d2efa | ||
|
|
d71dbea246 | ||
|
|
5ac786fb4c | ||
|
|
8cf6b6ea78 | ||
|
|
a99cbc2841 | ||
|
|
b23259309c | ||
|
|
b5a8fe8b1a | ||
|
|
c697f8a451 | ||
|
|
fb6dfbe7b4 | ||
|
|
15fba236d7 | ||
|
|
99e9c0086e | ||
|
|
c57a244ae1 | ||
|
|
e13a2cd18f | ||
|
|
58b7e6d584 | ||
|
|
1d569f13c2 | ||
|
|
a521f88859 | ||
|
|
a824e4d78e | ||
|
|
3d491c7e58 | ||
|
|
52842c61e5 | ||
|
|
4e3e63ba00 | ||
|
|
0c7a416cb5 | ||
|
|
63b4aa0e1d | ||
|
|
09dfaaa34a | ||
|
|
a4231ea30a | ||
|
|
387c824647 | ||
|
|
ec2a10e32f | ||
|
|
34a1f31f96 | ||
|
|
20b26ce57d | ||
|
|
717f28608f | ||
|
|
dc60ba972f | ||
|
|
98688b81c0 | ||
|
|
843a1bc690 | ||
|
|
8b360edb2b | ||
|
|
1175724e43 | ||
|
|
79295e77b6 | ||
|
|
f78cedbc0c | ||
|
|
cea889d912 | ||
|
|
98691dcdd4 | ||
|
|
6a6e05f035 | ||
|
|
60337934cb | ||
|
|
9a80c044fc | ||
|
|
5341fbedc6 | ||
|
|
53f667372d | ||
|
|
cd39606905 | ||
|
|
2d6f375c8b | ||
|
|
46dcdc5e94 | ||
|
|
79826a3601 | ||
|
|
826e90c087 | ||
|
|
087b6e77cc | ||
|
|
94f30e5c9f | ||
|
|
1f1f646f62 | ||
|
|
0ea7447901 | ||
|
|
1b893d59ea | ||
|
|
6a805b03fa | ||
|
|
71a1eb8e7c | ||
|
|
3823fb22d9 | ||
|
|
8810880616 | ||
|
|
cb496281b7 | ||
|
|
a65ec6e8c7 | ||
|
|
7576904587 | ||
|
|
f8cb879e42 | ||
|
|
5f4fa23a68 | ||
|
|
c2771be913 | ||
|
|
7a85a03fea | ||
|
|
5c848f75a6 | ||
|
|
7b65d868c4 | ||
|
|
35fefdc383 | ||
|
|
32d54fa50e | ||
|
|
be2690fd1c | ||
|
|
eaec744356 | ||
|
|
8951ebc69f | ||
|
|
c38ecb412b | ||
|
|
d190eeb46d | ||
|
|
03fc533848 | ||
|
|
7cb485fb43 | ||
|
|
fffede1c10 | ||
|
|
093c9451ec | ||
|
|
69eb8dacce | ||
|
|
b0e8bfa3ce | ||
|
|
5167f082f7 | ||
|
|
6d8a7a429c | ||
|
|
54f1f4c9a8 | ||
|
|
91cb795054 | ||
|
|
9fb9b8a1b0 | ||
|
|
d55f5c3b41 | ||
|
|
91fc7f2d9d | ||
|
|
3860faf851 | ||
|
|
76e1cd1113 | ||
|
|
dccf98602d | ||
|
|
e0eaf5cede | ||
|
|
58d8724cea | ||
|
|
1534696e0d | ||
|
|
b659f2ad8d | ||
|
|
2333b52d68 | ||
|
|
b0859f71cd | ||
|
|
2d814f3839 | ||
|
|
8b250e94cb | ||
|
|
0633131a73 | ||
|
|
dc98c839a2 | ||
|
|
0232a7abeb | ||
|
|
cde8b6aae3 | ||
|
|
8c493395c4 | ||
|
|
2e52af5275 | ||
|
|
20a6404d8d | ||
|
|
d6db2f3a7c | ||
|
|
29d1b68dd5 | ||
|
|
54dc57fcbf | ||
|
|
8f77a497b5 | ||
|
|
a1778eab52 | ||
|
|
18150cd920 | ||
|
|
5046071f3a | ||
|
|
fc952d089b | ||
|
|
79e2dfc502 | ||
|
|
c14aefd5ea | ||
|
|
a9a572c434 | ||
|
|
ddf88304ff | ||
|
|
aeb5c8419a | ||
|
|
49d8b5abd9 | ||
|
|
4384e50f34 | ||
|
|
90efc51359 | ||
|
|
ec6d11b7ae | ||
|
|
9ba3d9a6ba | ||
|
|
66cca02b36 | ||
|
|
c1d9622879 | ||
|
|
840bdc3878 | ||
|
|
460b95e6de | ||
|
|
a438f8fb99 | ||
|
|
097a930245 | ||
|
|
40866405fc | ||
|
|
d90af84311 | ||
|
|
cdd99f66b7 | ||
|
|
36cea4853f | ||
|
|
d05e9bf43e | ||
|
|
8ac41837b2 | ||
|
|
157427c750 | ||
|
|
e7cfa07392 | ||
|
|
838a412823 | ||
|
|
16eb105f03 | ||
|
|
14eaf6da4e | ||
|
|
7d28e09042 | ||
|
|
edfcf8e1bd | ||
|
|
2bba4f961a | ||
|
|
359ae80e22 | ||
|
|
dd489d48ba | ||
|
|
9189d73df9 | ||
|
|
6456950081 | ||
|
|
0df72b1803 | ||
|
|
904e2d705f | ||
|
|
4d078dc24a | ||
|
|
a7e26cb61f | ||
|
|
fd7a23225c | ||
|
|
0139cc92bf | ||
|
|
32bc3bacc0 | ||
|
|
1ba685c484 | ||
|
|
23c0e8b0f7 |
103
.env.example
103
.env.example
@@ -1,6 +1,6 @@
|
||||
APP_NAME=VueFileManager
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:sB1YuKsbWv7MdWugb9ZsYBqv2QZJ+QOuHZHEddOsUuo=
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:sC1YuKsbWv7MdWugb9ZsYBqv2QZJ+QOuHZHEddOsAao=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_DEMO=false
|
||||
@@ -10,8 +10,7 @@ LOG_CHANNEL=daily
|
||||
SCOUT_DRIVER=tntsearch
|
||||
SCOUT_QUEUE=true
|
||||
|
||||
FILESYSTEM_DRIVER=
|
||||
CHUNK_SIZE=128
|
||||
FILESYSTEM_DISK=local
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
@@ -20,9 +19,9 @@ DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
DB_MYSQLDUMP_PATH=
|
||||
DB_MYSQLDUMP_PATH=/usr/bin
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=database
|
||||
SESSION_DRIVER=file
|
||||
@@ -32,52 +31,76 @@ REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=
|
||||
MAIL_DRIVER=log
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=
|
||||
MAIL_USERNAME=example@domain.com
|
||||
MAIL_PASSWORD=
|
||||
MAIL_ENCRYPTION=
|
||||
MAIL_FROM_ADDRESS="${MAIL_USERNAME}"
|
||||
MAIL_FROM_NAME="${MAIL_USERNAME}"
|
||||
|
||||
OSS_ACCESS_KEY_ID=
|
||||
OSS_SECRET_ACCESS_KEY=
|
||||
OSS_REGION=
|
||||
OSS_BUCKET=
|
||||
OSS_ENDPOINT=
|
||||
OSS_URL=
|
||||
POSTMARK_TOKEN=
|
||||
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
MAILGUN_ENDPOINT=
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=
|
||||
AWS_BUCKET=
|
||||
AWS_SESSION_TOKEN=
|
||||
|
||||
DO_SPACES_KEY=
|
||||
DO_SPACES_SECRET=
|
||||
DO_SPACES_ENDPOINT=
|
||||
DO_SPACES_REGION=
|
||||
DO_SPACES_BUCKET=
|
||||
S3_ACCESS_KEY_ID=
|
||||
S3_SECRET_ACCESS_KEY=
|
||||
S3_DEFAULT_REGION=
|
||||
S3_BUCKET=
|
||||
S3_URL=
|
||||
|
||||
WASABI_KEY=
|
||||
WASABI_SECRET=
|
||||
WASABI_ENDPOINT=
|
||||
WASABI_REGION=
|
||||
WASABI_BUCKET=
|
||||
|
||||
BACKBLAZE_KEY=
|
||||
BACKBLAZE_SECRET=
|
||||
BACKBLAZE_ENDPOINT=
|
||||
BACKBLAZE_REGION=
|
||||
BACKBLAZE_BUCKET=
|
||||
|
||||
APP_DEPLOY_SECRET=
|
||||
|
||||
CASHIER_LOGGER=stack
|
||||
CASHIER_CURRENCY=
|
||||
STRIPE_KEY=
|
||||
STRIPE_SECRET=
|
||||
STRIPE_SECRET_KEY=
|
||||
STRIPE_PUBLIC_KEY=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
CASHIER_PAYMENT_NOTIFICATION=App\Notifications\ConfirmPayment
|
||||
|
||||
SANCTUM_STATEFUL_DOMAINS=localhost,localhost:8000,127.0.0.1,127.0.0.1:8000,::1
|
||||
PAYSTACK_SECRET=
|
||||
PAYSTACK_PUBLIC_KEY=
|
||||
|
||||
PAYPAL_CLIENT_ID=
|
||||
PAYPAL_CLIENT_SECRET=
|
||||
PAYPAL_WEBHOOK_ID=
|
||||
PAYPAL_IS_LIVE=false
|
||||
|
||||
FACEBOOK_CLIENT_ID=
|
||||
FACEBOOK_CLIENT_SECRET=
|
||||
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
GITHUB_CLIENT_ID=
|
||||
GITHUB_CLIENT_SECRET=
|
||||
|
||||
RECAPTCHA_CLIENT_ID=
|
||||
RECAPTCHA_CLIENT_SECRET=
|
||||
|
||||
SANCTUM_STATEFUL_DOMAINS=localhost,localhost:8000,127.0.0.1,127.0.0.1:8000,::1
|
||||
|
||||
PUSHER_APP_ID=local
|
||||
PUSHER_APP_KEY=local
|
||||
PUSHER_APP_SECRET=local
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
PUSHER_APP_HOST=
|
||||
PUSHER_APP_PORT=
|
||||
PUSHER_APP_TLS=true
|
||||
PUSHER_APP_ALLOWED_ORIGIN=
|
||||
|
||||
IS_ADMIN_VUEFILEMANAGER_BAR=true
|
||||
IS_SETUP_WIZARD_DEMO=false
|
||||
IS_SETUP_WIZARD_DEBUG=false
|
||||
|
||||
FTP_HOST=
|
||||
FTP_USERNAME=
|
||||
FTP_PASSWORD=
|
||||
|
||||
AZURE_STORAGE_NAME=
|
||||
AZURE_STORAGE_KEY=
|
||||
AZURE_STORAGE_CONTAINER=
|
||||
AZURE_STORAGE_URL=
|
||||
35
.env.testing
35
.env.testing
@@ -1,6 +1,6 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:47yorkyoH3qCrKKO4eG6LpZUogoTC51qey5vYq/O3AM=
|
||||
APP_KEY=base64:loZzMlfoaLRn2ASLI94No42c7aUvmhXkoU/I2ljmxQI=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_DEMO=false
|
||||
@@ -14,11 +14,11 @@ DB_DATABASE=database/test.sqlite
|
||||
DB_USERNAME=null
|
||||
DB_PASSWORD=null
|
||||
|
||||
FILESYSTEM_DRIVER=local
|
||||
BROADCAST_DRIVER=log
|
||||
FILESYSTEM_DISK=local
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_LIFETIME="15120"
|
||||
SCOUT_DRIVER=tntsearch
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
@@ -34,25 +34,12 @@ MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
CASHIER_LOGGER=stack
|
||||
CASHIER_CURRENCY=EUR
|
||||
STRIPE_KEY=pk_test_51GsACaCBETHMUxzVsYkeApHtqb85paMuye7G77PDDQ28kXqDJ5HTmqLi13aM6xee81OQK1fhkTZ7vmDiWLStU9160061Yb2MtL
|
||||
STRIPE_SECRET=sk_test_51GsACaCBETHMUxzVviYCrv0CeZMyWAOfBPe4uH5rkKJcJxrXhIciWQTr7UB1sgw9geoJMkNDVSWBQW36tuAsVznd00zhNHXhok
|
||||
STRIPE_WEBHOOK_SECRET=whsec_eKrDhqtpbMUXOKqrUHf78SrZxHHYOdrf
|
||||
CASHIER_PAYMENT_NOTIFICATION=App\Notifications\ConfirmPayment
|
||||
CASHIER_MODEL=App\Models\User
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
S3_ACCESS_KEY_ID=
|
||||
S3_SECRET_ACCESS_KEY=
|
||||
S3_DEFAULT_REGION=us-east-1
|
||||
S3_BUCKET=
|
||||
|
||||
SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,::1
|
||||
|
||||
|
||||
DB_MYSQLDUMP_PATH="/usr/bin"
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,6 +10,7 @@
|
||||
.env
|
||||
.env.backup
|
||||
.env.testing
|
||||
.php-cs-fixer.cache
|
||||
.phpunit.result.cache
|
||||
.phpstorm.meta.php
|
||||
.vscode/
|
||||
@@ -19,3 +20,4 @@ Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
prettier.json
|
||||
/public/temp
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,9 +2,10 @@
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in([
|
||||
__DIR__ . '/app',
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/routes',
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/tests',
|
||||
])
|
||||
->name('*.php')
|
||||
->notName('*.blade.php')
|
||||
@@ -12,62 +13,68 @@ $finder = PhpCsFixer\Finder::create()
|
||||
->ignoreVCS(true);
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
|
||||
return $config->setRules([
|
||||
'@PSR2' => true,
|
||||
'array_syntax' => [
|
||||
'@PSR2' => true,
|
||||
'nullable_type_declaration_for_default_null_value' => [
|
||||
'use_nullable_type_declaration' => true
|
||||
],
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short'
|
||||
],
|
||||
'ordered_imports' => [
|
||||
'ordered_imports' => [
|
||||
'sort_algorithm' => 'length'
|
||||
],
|
||||
'blank_line_before_statement' => [
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => ['break', 'case', 'continue', 'declare', 'default', 'do', 'exit', 'for', 'foreach', 'goto', 'if', 'include', 'include_once', 'require', 'require_once', 'return', 'switch', 'throw', 'try', 'while', 'yield', 'yield_from'],
|
||||
],
|
||||
'method_argument_space' => [
|
||||
'method_argument_space' => [
|
||||
'on_multiline' => 'ensure_fully_multiline',
|
||||
'keep_multiple_spaces_after_comma' => true,
|
||||
],
|
||||
'no_extra_blank_lines' => [
|
||||
'no_extra_blank_lines' => [
|
||||
'tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use', 'use_trait'],
|
||||
],
|
||||
'cast_spaces' => [
|
||||
'cast_spaces' => [
|
||||
'space' => 'single'
|
||||
],
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'single_space_after_construct' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'no_unused_imports' => true,
|
||||
'not_operator_with_successor_space' => true,
|
||||
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
|
||||
'phpdoc_scalar' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'binary_operator_spaces' => true,
|
||||
'single_trait_insert_per_statement' => false,
|
||||
'method_chaining_indentation' => true,
|
||||
'array_indentation' => true,
|
||||
'single_quote' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_empty_statement' => true,
|
||||
'standardize_increment' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_blank_lines_before_namespace' => true,
|
||||
'blank_line_after_namespace' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
'single_line_throw' => true,
|
||||
'function_typehint_space' => true,
|
||||
'simplified_if_return' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_unneeded_curly_braces' => true,
|
||||
'no_empty_comment' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'constant_case' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true,
|
||||
'use_arrow_functions' => true,
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'single_space_after_construct' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'no_unused_imports' => true,
|
||||
'not_operator_with_successor_space' => true,
|
||||
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
|
||||
'phpdoc_scalar' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'binary_operator_spaces' => ['operators' => ['=>' => 'align']],
|
||||
'single_trait_insert_per_statement' => false,
|
||||
'method_chaining_indentation' => true,
|
||||
'array_indentation' => true,
|
||||
'single_quote' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_empty_statement' => true,
|
||||
'standardize_increment' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_blank_lines_before_namespace' => true,
|
||||
'blank_line_after_namespace' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
'single_line_throw' => true,
|
||||
'function_typehint_space' => true,
|
||||
'simplified_if_return' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_unneeded_curly_braces' => true,
|
||||
'no_empty_comment' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'constant_case' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true,
|
||||
'lambda_not_used_import' => true,
|
||||
])
|
||||
->setFinder($finder);
|
||||
|
||||
@@ -51,23 +51,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -93,6 +94,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -140,6 +142,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -250,23 +253,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -292,6 +296,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -339,6 +344,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -449,23 +455,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -491,6 +498,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -538,6 +546,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -648,23 +657,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -690,6 +700,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -737,6 +748,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -847,23 +859,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -889,6 +902,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -936,6 +950,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -1046,23 +1061,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -1088,6 +1104,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -1135,6 +1152,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -1245,23 +1263,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -1287,6 +1306,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -1334,6 +1354,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -1444,23 +1465,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -1486,6 +1508,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -1533,6 +1556,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -1643,23 +1667,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -1685,6 +1710,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -1732,6 +1758,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -1842,23 +1869,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -1884,6 +1912,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -1931,6 +1960,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
@@ -2041,23 +2071,24 @@ namespace PHPSTORM_META {
|
||||
'Illuminate\Session\Middleware\StartSession' => \Illuminate\Session\Middleware\StartSession::class,
|
||||
'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class,
|
||||
'LaravelCrawlerDetect' => \Jaybizzle\CrawlerDetect\CrawlerDetect::class,
|
||||
'Laravel\Fortify\Contracts\CreatesNewUsers' => \App\Actions\Fortify\CreateNewUser::class,
|
||||
'Laravel\Fortify\Contracts\FailedPasswordConfirmationResponse' => \Laravel\Fortify\Http\Responses\FailedPasswordConfirmationResponse::class,
|
||||
'Laravel\Fortify\Contracts\FailedTwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\FailedTwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LockoutResponse' => \Laravel\Fortify\Http\Responses\LockoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\LoginResponse' => \Laravel\Fortify\Http\Responses\LoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\LogoutResponse' => \Laravel\Fortify\Http\Responses\LogoutResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordConfirmedResponse' => \Laravel\Fortify\Http\Responses\PasswordConfirmedResponse::class,
|
||||
'Laravel\Fortify\Contracts\PasswordUpdateResponse' => \Laravel\Fortify\Http\Responses\PasswordUpdateResponse::class,
|
||||
'Laravel\Fortify\Contracts\RegisterResponse' => \Laravel\Fortify\Http\Responses\RegisterResponse::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Actions\Fortify\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\ResetsUserPasswords' => \App\Users\Actions\ResetUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorAuthenticationProvider' => \Laravel\Fortify\TwoFactorAuthenticationProvider::class,
|
||||
'Laravel\Fortify\Contracts\TwoFactorLoginResponse' => \Laravel\Fortify\Http\Responses\TwoFactorLoginResponse::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Actions\Fortify\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Actions\Fortify\UpdateUserProfileInformation::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserPasswords' => \App\Users\Actions\UpdateUserPassword::class,
|
||||
'Laravel\Fortify\Contracts\UpdatesUserProfileInformation' => \App\Users\Actions\UpdateUserProfileInformation::class,
|
||||
'Laravel\Scout\EngineManager' => \Laravel\Scout\EngineManager::class,
|
||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Spatie\Backup\Helpers\ConsoleOutput' => \Spatie\Backup\Helpers\ConsoleOutput::class,
|
||||
'Spatie\Backup\Tasks\Cleanup\CleanupStrategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
'Spatie\QueryBuilder\QueryBuilderRequest' => \Spatie\QueryBuilder\QueryBuilderRequest::class,
|
||||
'Stripe\Util\LoggerInterface' => \Laravel\Cashier\Logger::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
@@ -2083,6 +2114,7 @@ namespace PHPSTORM_META {
|
||||
'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class,
|
||||
'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class,
|
||||
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
|
||||
'command.db.prune' => \Illuminate\Database\Console\PruneCommand::class,
|
||||
'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class,
|
||||
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
|
||||
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
|
||||
@@ -2130,6 +2162,7 @@ namespace PHPSTORM_META {
|
||||
'command.queue.forget' => \Illuminate\Queue\Console\ForgetFailedCommand::class,
|
||||
'command.queue.listen' => \Illuminate\Queue\Console\ListenCommand::class,
|
||||
'command.queue.prune-batches' => \Illuminate\Queue\Console\PruneBatchesCommand::class,
|
||||
'command.queue.prune-failed-jobs' => \Illuminate\Queue\Console\PruneFailedJobsCommand::class,
|
||||
'command.queue.restart' => \Illuminate\Queue\Console\RestartCommand::class,
|
||||
'command.queue.retry' => \Illuminate\Queue\Console\RetryCommand::class,
|
||||
'command.queue.retry-batch' => \Illuminate\Queue\Console\RetryBatchCommand::class,
|
||||
|
||||
5
.prettierrc.yaml
Normal file
5
.prettierrc.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
trailingComma: "es5"
|
||||
tabWidth: 4
|
||||
semi: false
|
||||
singleQuote: true
|
||||
printWidth: 120
|
||||
364
README.md
364
README.md
@@ -1,48 +1,53 @@
|
||||
[](https://github.com/MakingCG/vuefilemanager/actions/workflows/build.yml)
|
||||
[](https://github.com/MakingCG/vuefilemanager/actions/workflows/unit-testing.yml)
|
||||
|
||||

|
||||
# Private Cloud Storage Build on Laravel & Vue.js
|
||||
# Private Cloud Storage Build by Laravel & Vue.js
|
||||
|
||||
## Contents
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Server Requirements](#server-requirements)
|
||||
- [Installation](#installation)
|
||||
- [PHP Configuration](#php-configuration)
|
||||
- [Chunk Upload](#chunk-upload)
|
||||
- [Nginx Configuration](#nginx-configuration)
|
||||
- [Apache Configuration](#apache-configuration)
|
||||
- [Upgrade Guide](#upgrade-guide)
|
||||
- [Payments](#payments)
|
||||
- [Get your active plans](#get-your-active-plans)
|
||||
- [Manage Failed Payments](#manage-failed-payments)
|
||||
- [Tax Rates](#tax-rates)
|
||||
- [Server Requirements](#server-requirements)
|
||||
- [Installation](#installation)
|
||||
- [Updating Application](#updating-application)
|
||||
- [Nginx Configuration](#nginx-configuration)
|
||||
- [Apache Configuration](#apache-configuration)
|
||||
- [Migrating to Another Domain](#migrating-to-another-domain)
|
||||
- [Social Authentication](#social-authentication)
|
||||
- [Subscription Configuration](#subscription-configuration)
|
||||
- [Configuring Production/Testing Environment](#configuring-productiontesting-environment)
|
||||
- [Upgrading From Testing Environment to the Production Mode](#upgrading-from-testing-environment-to-the-production-mode)
|
||||
- [Broadcasting](#broadcasting)
|
||||
- [About Broadcasting](#about-broadcasting)
|
||||
- [Install VueFileManager Broadcast Server](#install-vuefilemanager-broadcast-server)
|
||||
- [Developers](#developers)
|
||||
- [Running development environment on your localhost](#running-development-environment-on-your-localhost)
|
||||
- [Supported Storages](#supported-storages)
|
||||
- [Running Environment On Your Localhost](#running-environment-on-your-localhost)
|
||||
- [Express Installation](#express-installation)
|
||||
- [Express Installation with Demo Data](#express-installation-with-demo-data)
|
||||
- [Generate Demo Data for Metered Subscription](#generate-demo-data-for-metered-subscription)
|
||||
- [Generate Demo Data for Fixed Subscription](#generate-demo-data-for-fixed-subscription)
|
||||
- [Sanctum Stateful Domains](#sanctum-stateful-domains)
|
||||
- [Running your Local Server](#running-your-local-server)
|
||||
- [Building Your App for Production](#building-your-app-for-production)
|
||||
- [Others](#others)
|
||||
- [Changelog](#changelog)
|
||||
- [Support](#support)
|
||||
- [Security Vulnerabilities](#security-vulnerabilities)
|
||||
|
||||
- [Support](#support)
|
||||
- [Security Vulnerabilities](#security-vulnerabilities)
|
||||
|
||||
# Installation
|
||||
## Server Requirements
|
||||
|
||||
**For running app make sure you have:**
|
||||
|
||||
**For running app make sure you have installed:**
|
||||
|
||||
- PHP >= 7.3 version
|
||||
- PHP >= 8.1
|
||||
- MySQL 5.6+
|
||||
- Nginx or Apache
|
||||
- Nginx or Apache (Nginx recommended)
|
||||
|
||||
**These PHP Extensions are require:**
|
||||
|
||||
- finfo
|
||||
- Intl
|
||||
- GD
|
||||
- BCMath
|
||||
- PDO
|
||||
- SQLite
|
||||
- SQLite3
|
||||
- Ctype
|
||||
- Fileinfo
|
||||
- JSON
|
||||
@@ -54,60 +59,57 @@
|
||||
|
||||
## Installation
|
||||
|
||||
#### 1. Upload files on your server
|
||||
Upload project files to web root folder of your domain. It's mostly located in `html`, `www` or `public_html` folder name.
|
||||
- [How to install VPS with Debian 10](https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-laravel-application-on-vps-with-debian-10-64676a3ff4d7)
|
||||
- [How to Set Up AWS S3](https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-with-aws-s3-as-an-external-storage-a2c525aec698)
|
||||
- [How to Set Up Digital Ocean Spaces](https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-with-digital-ocean-spaces-as-a-external-storage-6cccf590c23d)
|
||||
|
||||
#### 2. Configure your web root folder
|
||||
Configure your web server's document root to point to the public directory of the files you previously uploaded. For example, if you've uploaded the files in `html` folder, your domain root directory should be changed to `html/project_files/public` folder or anything else where domain root is in project `/public` directory.
|
||||
### 1. Upload files on your server
|
||||
Upload project files to the web root folder of your domain. It's mostly located in `html`, `www` or `public_html` folder name.
|
||||
|
||||
Please don't try go to `yourdomain.com/public` URL address, you will have issue to verify your purchase code, this is not correct domain root setup, you must do this in your webhosting settings panel.
|
||||
### 2. Configure your Document Root
|
||||
Configure your domain document root to the point of the files you previously uploaded directly into `/public` folder. So, if you uploaded files into `/public_html` folder, your document root must be set as `/public_html/public`. It should [look like this](https://i.ibb.co/SfLdmCQ/Screenshot-2022-04-06-at-08-53-29.png)
|
||||
|
||||

|
||||
Don't forget to enable Force HTTPS Redirect.
|
||||
|
||||
#### 3. Check your .env file
|
||||
Make sure `.env` file was uploaded. This type of file can be hidden in default.
|
||||
### 3. Set write permissions
|
||||
Set `755` permission (CHMOD) to these files and folders directory within all children subdirectories:
|
||||
|
||||
#### 4. Set write permissions
|
||||
Set `755` permission (CHMOD) to these file and folders directory within all children subdirectories:
|
||||
|
||||
- /bootstrap/cache
|
||||
- /bootstrap
|
||||
- /storage
|
||||
- /.env
|
||||
|
||||
#### 5. Open your application in your web browser
|
||||
Then open your application in web browser. If everything works fine, you will be redirect to setup wizard installation process.
|
||||
### 4. Open your application in your web browser
|
||||
Then open your application in web browser. If everything works fine, you will be redirected to the setup wizard installation process.
|
||||
|
||||
At first step you have to verify your purchase code. **Subscription service with stripe payments is available only for Extended License.** If you can't verify your purchase code, check, if you did previously steps correctly.
|
||||
### 5. Server Check
|
||||
On the first page you will see server check. Make sure all items are green. If not, then correct your server setup by recommended values and refresh your setup wizard page.
|
||||
|
||||
#### 6. Follow setup wizard steps
|
||||
### 6. Follow setup wizard steps
|
||||
|
||||
That was the hardest part of installation proces. Please follow instructions in every step of Setup Wizard to successfully install VueFileManager.
|
||||
That was the hardest part of installation process. Please follow instructions in every step of Setup Wizard to successfully install VueFileManager.
|
||||
|
||||
#### 7. Set up Cron
|
||||
### 7. Set up Cron
|
||||
|
||||
Add the following Cron entry to your server. Just update your php path (if it's different) and project path:
|
||||
```
|
||||
* * * * * /usr/local/bin/php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
|
||||
```
|
||||
#### If you are running VueFileManager on shared web hosting (CPanel, Plesk etc.)
|
||||
1. Create new cron job
|
||||
2. Set execution cycle for every minute
|
||||
3. Login to the VueFileManager as admin and go to the admin dashboard, you will see command which you have to copy and paste into the command input.
|
||||
|
||||
## PHP Configuration
|
||||
There are several PHP settings good to know to setup before you try upload any file. Please set these values in your php.ini, we provide minimal setup for you. When you set `-1` then you set infinity limits.
|
||||
#### If you are running VueFileManager on linux server
|
||||
1. Go to the terminal and run command `crontab -e`
|
||||
2. Login to the VueFileManager as admin and go to the admin dashboard, you will see command which you have to copy and paste into the end of file.
|
||||
3. Leave crontab and save the file.
|
||||
|
||||
```
|
||||
memory_limit = 512M
|
||||
upload_max_filesize = 128M
|
||||
post_max_size = 128M
|
||||
max_file_uploads = 50
|
||||
max_execution_time = 3600
|
||||
```
|
||||
### 8. CORS Configuration (When you Set External S3 Storage)
|
||||
In your s3 bucket settings you should have option to set up your CORS (Cross-Origin Resource Sharing). It's basically adding your app url to the list of allowed CORS. This step is required for reading pdf documents from s3 in your VueFileManager app without loading issues.
|
||||
|
||||
## Chunk & Multipart Upload
|
||||
VueFileManager in default supporting chunk upload. Default chunk upload size is `128MB`. If you wish change this default value, go to your `.env` and change `CHUNK_SIZE` attribute.
|
||||
|
||||
When you use external storage, and upload large files, to prevent failing upload process make sure you have enough space in your application space and set higher `max_execution_time` in your php.ini to move your files to external storage.
|
||||
# Updating Application
|
||||
1. Replace all files where the app is located except `/storage` folder and `.env` file.
|
||||
2. Clear the application cache (Admin / Settings / Application).
|
||||
3. In 5 minutes the app update stuff automatically on the background if needed.
|
||||
|
||||
## Nginx Configuration
|
||||
If you running VueFileManager undex Nginx, don't forget set this value in your `nginx.conf` file:
|
||||
If you running VueFileManager under Nginx, don't forget set this value in your `nginx.conf` file:
|
||||
```
|
||||
http {
|
||||
client_max_body_size 1024M;
|
||||
@@ -167,57 +169,208 @@ Make sure you have enabled mod_rewrite. There is an example config for running V
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
## Upgrade Guide
|
||||
### Common Instructions
|
||||
`Don't forget create backup of your database before make any changes in your production application. If you serve your files in local storage driver pay attention and don't delete your /storage folder!`
|
||||
## Migrating to Another Domain
|
||||
If you move your VueFileManager application into another domain or subdomain, you have to manually change values in your `.env` file.
|
||||
1. Open your `/.env` file.
|
||||
2. Find `APP_URL` variable and write your new domain location. Don't forget start with defining `https://` protocol.
|
||||
3. Find `SANCTUM_STATEFUL_DOMAINS` variable and write your new domain location without http protocol.
|
||||
4. Remove your cached config file which is located `/bootstrap/cache/config.php`.
|
||||
|
||||
These instructions is applicable for all updates. Please follow this step:
|
||||
## Social Authentication
|
||||
If you'd like to allow your users to authenticate via their social accounts, the setup is pretty convenient. Just don't forget to set up redirect url and required permissions.
|
||||
|
||||
- Just rewrite all project files with new excluded `/.env` file and `/storage` folder. These items must be preserved!
|
||||
#### Required permissions:
|
||||
- Name and profile picture
|
||||
- Email
|
||||
|
||||
# Subscription Configuration
|
||||
|
||||
# Payments
|
||||
VueFileManager is packed with **Stripe** payment options. To configure Stripe, you will be asked in Setup Wizard to set up. Or, if you skip this installation process, you will find stripe set up in you admin `Dashboard / Settings / Payments`.
|
||||
## Configuring Production/Testing Environment
|
||||
To set up your subscription, please follow these steps below.
|
||||
1. If you didn't set up your subscription type in Setup Wizard, go to the `Admin / Settings / Application` and find subscription widget. Next set value as `Fixed`.
|
||||
2. Go to the `Admin / Billings` and fill the inputs with your billing information.
|
||||
3. Go to the `Admin / Payments` and turn on the switch `Allow Subscription Payments`.
|
||||
4. Set up credentials for all payment gateway you want. If you set production mode, make sure you fill your credentials with production keys, and vice versa. If needed, don't forget to turn on `live mode` for PayPal.
|
||||
5. Set up your webhooks, you can find your webhook url in payment gateway widget.
|
||||
6. Go to the `Admin / Plans` and create your first plan. Make sure all payment gateways support the currency you want, especially for Paystack, it supports only `GHS, NGN, USD and ZAR`.
|
||||
|
||||
## Manage Failed Payments
|
||||
VueFileManager manage failed payments with additional email notification. But, there is more you can do for better User Experience. There is some additionals option in Stripe, look on [prevent failed payments](https://dashboard.stripe.com/settings/billing/automatic).
|
||||
## Upgrading From Testing Environment to the Production Mode
|
||||
1. Go to the `Admin / Payments` and set up credentials for all payment gateway you want with production keys type. Don't forget to turn on `live mode` for PayPal.
|
||||
2. Go to the `Admin / Plans` and delete all your previously created plans. They will be archived.
|
||||
3. Create new production plans you want offer.
|
||||
|
||||
## Tax Rates
|
||||
You are able to manage tax rates. When adding a new tax rate, if no Region is specified, the tax rate will apply to everyone. Add a [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) to the Region field if you wish to apply taxes per country.
|
||||
# Broadcasting
|
||||
### About Broadcasting
|
||||
Broadcasting is responsible for real time app experience. If broadcasting is set, you will be able to get just in time updates in your app.
|
||||
|
||||
Just log in to your stripe dashboard, and you will find taxes under `Dashboard / Products / Tax Rates`.
|
||||
For example, remote upload works on the background, while the files are downloading and showing in your view immediately after they are ready without refreshing the app. Or, you will get immediately notifications about new events like team invitations, file requests and many more.
|
||||
|
||||
More real time features will be implemented in incoming updates.
|
||||
|
||||
VueFileManager support 2 types of connections:
|
||||
1. [Pusher](https://pusher.com/) - Suitable for all users and all hosting platforms
|
||||
2. VueFileManager Broadcast Server - Free of charge, suitable for experienced users, limited for VPS servers
|
||||
|
||||
## Install VueFileManager Broadcast Server
|
||||
We strongly recommend only for experienced users to set up and running VueFileManager broadcast server. For others, we recommend to use Pusher service to easy set up and host broadcasting service.
|
||||
|
||||
### Server Requirements
|
||||
**For running app make sure you have:**
|
||||
|
||||
- VPS server with SSH access
|
||||
- PHP >= 8.0.2 version (8.1+ recommended)
|
||||
- Nginx
|
||||
- Supervisor
|
||||
- Certbot
|
||||
|
||||
### Installation
|
||||
We assume you have installed and running properly your VPS server.
|
||||
### Websocket Server Set Up
|
||||
Upload VueFileManager into your server, for example path directory `/var/www/sockets` would be great. Next connect to your server with ssh and change your terminal directory into VueFileManager:
|
||||
```
|
||||
cd /var/www/sockets
|
||||
```
|
||||
Run installation command for websocket server. You will be prompted to type host of which you want to allow incoming requests.
|
||||
```
|
||||
php artisan websockets:install
|
||||
```
|
||||
### Domain & Nginx Set Up
|
||||
Create subdomain for your socket host, for example `socket.vuefilemanager.com` and direct this subdomain to your vps where socket server will be running.
|
||||
|
||||
Then, create nginx config for your subdomain:
|
||||
```
|
||||
nano /etc/nginx/sites-available/socket.conf
|
||||
```
|
||||
And paste the template below, just replace subdomain with yours:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name socket.vuefilemanager.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:6001;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
}
|
||||
```
|
||||
Enable your created config by this command:
|
||||
```
|
||||
ln -s /etc/nginx/sites-available/socket.conf /etc/nginx/sites-enabled/
|
||||
```
|
||||
Restart your nginx:
|
||||
```
|
||||
systemctl restart nginx
|
||||
```
|
||||
In the last step, install ssl certificate for your previously created subdomain with certbot:
|
||||
```
|
||||
certbot --nginx
|
||||
```
|
||||
### Supervisor Configuration
|
||||
We need supervisor to manage running your websocket server on the background.
|
||||
In `/etc/supervisor/conf.d` (Debian/Ubuntu) or `/etc/supervisord.d/` (Red Hat/CentOS) create a file `websockets.conf`.
|
||||
|
||||
Just edit php path, project path and user when they are different for your vps:
|
||||
```
|
||||
[program:websockets]
|
||||
command=/usr/bin/php /var/www/socket/artisan websockets:serve
|
||||
numprocs=1
|
||||
autostart=true
|
||||
autorestart=true
|
||||
user=www-data
|
||||
```
|
||||
Run command below to start your websocket server:
|
||||
```
|
||||
supervisorctl start websockets
|
||||
```
|
||||
Run command below to stop your websocket server:
|
||||
```
|
||||
supervisorctl stop websockets
|
||||
```
|
||||
When you update code or server for some reason, you must also update running supervisor:
|
||||
```
|
||||
supervisorctl reload
|
||||
```
|
||||
### VueFileManager Set Up
|
||||
Log in to your VueFileManager admin account and go to `Admin / Settings / Environment`.
|
||||
|
||||
Find Broadcasting form and select `VueFileManager` as broadcasting driver. Set your hostname and save the form.
|
||||
|
||||
That's all, you are running your own Broadcast server.
|
||||
|
||||
# Developers
|
||||
## Running development environment on your localhost
|
||||
## Running Environment On Your Localhost
|
||||
|
||||
When you download repository from GitHub, you have to rename your `.env.example` file to `.env`. Then run command below in your terminal to install vendors. Composer is required.
|
||||
**For running development environment make sure you have:**
|
||||
|
||||
- Node >= 14
|
||||
- NPM >= 6
|
||||
|
||||
### Express Installation
|
||||
If you would like to have express installation without Setup Wizard process, please update your database credentials in .env file
|
||||
```
|
||||
composer install
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
```
|
||||
Next, run this command below. Admin account will be created with credentials `howdy@hi5ve.digital` and password `vuefilemanager`.
|
||||
```
|
||||
php artisan setup:prod
|
||||
```
|
||||
|
||||
Set your `APP_ENV` to local mode, in default, it's in production mode.
|
||||
### Express Installation with Demo Data
|
||||
If you would like to generate demo content, run this command below. Admin account will be created with credentials `howdy@hi5ve.digital` and password `vuefilemanager`.
|
||||
```
|
||||
APP_ENV=local
|
||||
php artisan setup:dev
|
||||
```
|
||||
|
||||
Also, to debug application, set `APP_DEBUG` on true:
|
||||
### Generate Demo Data for Metered Subscription
|
||||
If you would like to generate demo content for the subscription with the metered billing, run this command below.
|
||||
```
|
||||
APP_DEBUG=true
|
||||
php artisan subscription:demo metered
|
||||
```
|
||||
|
||||
To start server on your localhost, run command below. Then go to your generated localhost URL by terminal, and follow Setup Wizard steps to configure VueFileManager.
|
||||
### Generate Demo Data for Fixed Subscription
|
||||
If you would like to generate demo content for the subscription with the fixed billing, please fill the credentials in your `.env` file for the payment systems you'd like to use:
|
||||
```
|
||||
STRIPE_SECRET_KEY=
|
||||
STRIPE_PUBLIC_KEY=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
|
||||
PAYSTACK_SECRET=
|
||||
PAYSTACK_PUBLIC_KEY=
|
||||
|
||||
PAYPAL_CLIENT_ID=
|
||||
PAYPAL_CLIENT_SECRET=
|
||||
PAYPAL_WEBHOOK_ID=
|
||||
PAYPAL_IS_LIVE=false
|
||||
```
|
||||
and then run this command to generate demo content for fixed subscription:
|
||||
```
|
||||
php artisan subscription:demo fixed
|
||||
```
|
||||
|
||||
### Sanctum Stateful Domains
|
||||
After installation, please make sure your current host/domain where you are running app is included in your `.env` file in `SANCTUM_STATEFUL_DOMAINS` variable.
|
||||
|
||||
### Running your Local Server
|
||||
To start server on your localhost, run command below.
|
||||
```
|
||||
php artisan serve
|
||||
```
|
||||
|
||||
After successfully installation via Setup Wizard, stop your artisan server, clear config cache and run your artisan server again:
|
||||
```
|
||||
php artisan config:clear
|
||||
php artisan serve
|
||||
```
|
||||
*After any change in your .env you have to restart your artisan server to reload your config cache.*
|
||||
|
||||
To develop your Vue front-end, you have to install npm modules by this command:
|
||||
For developing Vue front-end, you have to install npm modules by this command:
|
||||
```
|
||||
npm install
|
||||
```
|
||||
@@ -227,36 +380,12 @@ To compiles and hot-reloads for front-end development. Then run this command:
|
||||
npm run hot
|
||||
```
|
||||
|
||||
### Building Your App for Production
|
||||
To compiles for production build, run this command
|
||||
```
|
||||
npm run prod
|
||||
```
|
||||
|
||||
## Supported Storages
|
||||
VueFileManager support these storages for your files:
|
||||
|
||||
- [Amazon Web Services S3](https://aws.amazon.com/s3/)
|
||||
- [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces/)
|
||||
- [Object Cloud Storage by Wasabi](https://wasabi.com/)
|
||||
- [Backblaze B2 Cloud Storage](https://www.backblaze.com/b2/cloud-storage.html)
|
||||
- Your local disk
|
||||
|
||||
In case of installation process, you will be able to set storage driver and credentials. After this, you can change your credentials later in `/.env` file.
|
||||
|
||||
To set or change your storage driver, you have to edit `FILESYSTEM_DRIVER` in your `/.env` file. Supported drivers are `s3`, `spaces`, `wasabi`,`backblaze` or `local`:
|
||||
```
|
||||
FILESYSTEM_DRIVER=local
|
||||
```
|
||||
Then you can find corresponding credentials options for your storage driver like key, secret, region in `/.env` file.
|
||||
|
||||
# Others
|
||||
## Changelog
|
||||
|
||||
Refer to the [Changelog](https://vuefilemanager.com/changelog) for a full history of the project.
|
||||
|
||||
## GitHub Repository
|
||||
[Join our GitHub repository](https://vuefilemanager.com/github-access) to submit your issues or suggestions, track VueFileManager progress and get new updates as fast as possible.
|
||||
|
||||
## Support
|
||||
|
||||
The following support channels are available at your fingertips:
|
||||
@@ -264,11 +393,10 @@ The following support channels are available at your fingertips:
|
||||
- [CodeCanyon support message](https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986/support)
|
||||
|
||||
## Supporting VueFileManager
|
||||
Hi, we are trying make the best experience with VueFileManager. There is a lot things to do, and a lot of features we can make.
|
||||
We are trying to make the best for VueFileManager. There are a lot of things to do, and a lot of features we can make.
|
||||
But, it can't be done without you, development is more and more complicated and we have to hire new colleagues to help us. There is couple way you can support us, and then, we support you with all great new features we can make. Thank you for participating on this awesome application!
|
||||
|
||||
But, it can't be done without you, development is more and more complicated and we have to hire new colleagues to help with it. There is couple way you can support us, and then, we support you with all great new features which can be. Thanks you for participating on this awesome software!
|
||||
|
||||
- [Buy me a Coffe](https://www.buymeacoffee.com/pepe)
|
||||
- [Buy me a Coffee](https://www.buymeacoffee.com/pepe)
|
||||
- [Become a Patreon](https://www.patreon.com/vuefilemanager)
|
||||
- [One-time donation via PayPal](https://www.paypal.me/peterpapp)
|
||||
|
||||
|
||||
19182
_ide_helper.php
19182
_ide_helper.php
File diff suppressed because it is too large
Load Diff
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
namespace App\Actions\Fortify;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Setting;
|
||||
use App\Models\UserSettings;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Laravel\Fortify\Contracts\CreatesNewUsers;
|
||||
|
||||
class CreateNewUser implements CreatesNewUsers
|
||||
{
|
||||
use PasswordValidationRules;
|
||||
|
||||
/**
|
||||
* Validate and create a newly registered user.
|
||||
*
|
||||
* @param array $input
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
public function create(array $input)
|
||||
{
|
||||
$settings = Setting::whereIn('name', ['storage_default', 'registration'])
|
||||
->pluck('value', 'name');
|
||||
|
||||
// Check if account registration is enabled
|
||||
if (! intval($settings['registration'])) {
|
||||
abort(401);
|
||||
}
|
||||
|
||||
Validator::make($input, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => [
|
||||
'required',
|
||||
'string',
|
||||
'email',
|
||||
'max:255',
|
||||
Rule::unique(User::class),
|
||||
],
|
||||
'password' => $this->passwordRules(),
|
||||
])->validate();
|
||||
|
||||
$user = User::create([
|
||||
'email' => $input['email'],
|
||||
'password' => bcrypt($input['password']),
|
||||
]);
|
||||
|
||||
UserSettings::unguard();
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
'name' => $input['name'],
|
||||
'storage_capacity' => $settings['storage_default'],
|
||||
]);
|
||||
|
||||
UserSettings::reguard();
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
@@ -1,889 +0,0 @@
|
||||
<?php
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\User;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Services\SetupService;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
|
||||
class SetupDevEnvironment extends Command
|
||||
{
|
||||
use WithFaker;
|
||||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'setup:dev';
|
||||
protected $license = 'Extended';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Set up development environment with demo data';
|
||||
|
||||
private $setup;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setUpFaker();
|
||||
$this->setup = resolve(SetupService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
* return @void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$this->info('Setting up development environment');
|
||||
|
||||
$this->info('Creating system directories...');
|
||||
$this->setup->create_directories();
|
||||
|
||||
$this->info('Migrating Databases...');
|
||||
$this->migrate_and_generate();
|
||||
|
||||
$this->info('Storing default settings and content...');
|
||||
$this->store_default_settings();
|
||||
$this->setup->seed_default_pages();
|
||||
$this->setup->seed_default_settings($this->license);
|
||||
$this->setup->seed_default_language();
|
||||
|
||||
$this->info('Creating default admin...');
|
||||
$this->create_admin();
|
||||
|
||||
$this->info('Creating demo users...');
|
||||
$this->create_demo_users();
|
||||
|
||||
$this->info('Creating default admin content...');
|
||||
$this->create_admin_default_content();
|
||||
$this->create_share_records();
|
||||
|
||||
$this->info('Clearing application cache...');
|
||||
$this->clear_cache();
|
||||
|
||||
$this->info('Dispatching jobs...');
|
||||
$this->call('queue:work', [
|
||||
'--stop-when-empty' => true,
|
||||
]);
|
||||
|
||||
$this->info('Everything is done, congratulations! 🥳🥳🥳');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default admin account
|
||||
*/
|
||||
private function create_admin(): void
|
||||
{
|
||||
$user = User::forceCreate([
|
||||
'role' => 'admin',
|
||||
'email' => 'howdy@hi5ve.digital',
|
||||
'password' => bcrypt('vuefilemanager'),
|
||||
]);
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
'avatar' => 'avatars/avatar-01.png',
|
||||
'storage_capacity' => 5,
|
||||
'name' => 'Jane Doe',
|
||||
'address' => $this->faker->address,
|
||||
'state' => $this->faker->state,
|
||||
'city' => $this->faker->city,
|
||||
'postal_code' => $this->faker->postcode,
|
||||
'country' => $this->faker->randomElement(['SK', 'CZ', 'DE', 'FR']),
|
||||
'phone_number' => $this->faker->phoneNumber,
|
||||
'timezone' => $this->faker->randomElement(['+1.0', '+2.0', '+3.0']),
|
||||
]);
|
||||
|
||||
Storage::putFileAs('avatars', storage_path('demo/avatars/avatar-01.png'), 'avatar-01.png', 'private');
|
||||
|
||||
// Show user credentials
|
||||
$this->info('Default admin account created. Email: howdy@hi5ve.digital and Password: vuefilemanager');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default admin account
|
||||
*/
|
||||
private function create_demo_users(): void
|
||||
{
|
||||
collect([
|
||||
[
|
||||
'avatar' => 'avatar-02.png',
|
||||
],
|
||||
[
|
||||
'avatar' => 'avatar-03.png',
|
||||
],
|
||||
])->each(function ($user) {
|
||||
$newbie = User::forceCreate([
|
||||
'role' => 'user',
|
||||
'email' => $this->faker->email,
|
||||
'password' => bcrypt('vuefilemanager'),
|
||||
]);
|
||||
|
||||
$newbie
|
||||
->settings()
|
||||
->create([
|
||||
'avatar' => "avatars/{$user['avatar']}",
|
||||
'storage_capacity' => 5,
|
||||
'name' => $this->faker->name,
|
||||
'address' => $this->faker->address,
|
||||
'state' => $this->faker->state,
|
||||
'city' => $this->faker->city,
|
||||
'postal_code' => $this->faker->postcode,
|
||||
'country' => $this->faker->randomElement(['SK', 'CZ', 'DE', 'FR']),
|
||||
'phone_number' => $this->faker->phoneNumber,
|
||||
'timezone' => $this->faker->randomElement(['+1.0', '+2.0', '+3.0']),
|
||||
]);
|
||||
|
||||
Storage::putFileAs('avatars', storage_path("demo/avatars/{$user['avatar']}"), $user['avatar'], 'private');
|
||||
|
||||
$this->info("Generated user with email: $newbie->email and Password: vuefilemanager");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default admin content
|
||||
*/
|
||||
private function create_admin_default_content(): void
|
||||
{
|
||||
$user = User::whereEmail('howdy@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
// 1.
|
||||
$shared_folder = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Shared Folder',
|
||||
'emoji' => [
|
||||
'codes' => '1F680',
|
||||
'char' => '🚀',
|
||||
'name' => 'rocket',
|
||||
'category' => 'Travel & Places (transport-air)',
|
||||
'group' => 'Travel & Places',
|
||||
'subgroup' => 'transport-air',
|
||||
],
|
||||
'created_at' => now(),
|
||||
]);
|
||||
|
||||
Share::factory(Share::class)
|
||||
->create([
|
||||
'type' => 'folder',
|
||||
'item_id' => $shared_folder->id,
|
||||
'user_id' => $user->id,
|
||||
'permission' => 'editor',
|
||||
'is_protected' => false,
|
||||
'password' => null,
|
||||
'expire_in' => null,
|
||||
]);
|
||||
|
||||
$peters_files = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $shared_folder->id,
|
||||
'author' => 'visitor',
|
||||
'name' => "Peter's Files",
|
||||
]);
|
||||
|
||||
// 2.
|
||||
$random_pics = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Random Pics',
|
||||
'emoji' => [
|
||||
'codes' => '1F4F7',
|
||||
'char' => '📷',
|
||||
'name' => 'camera',
|
||||
'category' => 'Objects (light & video)',
|
||||
'group' => 'Objects',
|
||||
'subgroup' => 'light & video',
|
||||
],
|
||||
'created_at' => now()->subMinutes(1),
|
||||
]);
|
||||
|
||||
$nature = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $random_pics->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Nature',
|
||||
'emoji' => [
|
||||
'codes' => '26F0',
|
||||
'char' => '⛰',
|
||||
'name' => 'mountain',
|
||||
'category' => 'Travel & Places (place-geographic)',
|
||||
'group' => 'Travel & Places',
|
||||
'subgroup' => 'place-geographic',
|
||||
],
|
||||
]);
|
||||
|
||||
$apartments = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $random_pics->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Apartments',
|
||||
'emoji' => [
|
||||
'codes' => '1F3E0',
|
||||
'char' => '🏠',
|
||||
'name' => 'house',
|
||||
'category' => 'Travel & Places (place-building)',
|
||||
'group' => 'Travel & Places',
|
||||
'subgroup' => 'place-building',
|
||||
],
|
||||
]);
|
||||
|
||||
// 3.
|
||||
$playable_media = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Playable Media',
|
||||
'created_at' => now()->subMinutes(2),
|
||||
]);
|
||||
|
||||
$video = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $playable_media->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Video',
|
||||
]);
|
||||
|
||||
$audio = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $playable_media->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Audio',
|
||||
]);
|
||||
|
||||
// 4.
|
||||
$multi_level = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Multi Level Folder',
|
||||
'created_at' => now()->subMinutes(3),
|
||||
]);
|
||||
|
||||
$first_level = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $multi_level->id,
|
||||
'author' => 'user',
|
||||
'name' => 'First Level',
|
||||
]);
|
||||
|
||||
$second_level = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $first_level->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Second Level',
|
||||
]);
|
||||
|
||||
$third_level = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $second_level->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Third Level',
|
||||
]);
|
||||
|
||||
// 5.
|
||||
$documents = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Documents',
|
||||
'created_at' => now()->subMinutes(4),
|
||||
]);
|
||||
|
||||
Share::factory(Share::class)
|
||||
->create([
|
||||
'type' => 'folder',
|
||||
'item_id' => $documents->id,
|
||||
'user_id' => $user->id,
|
||||
'permission' => 'editor',
|
||||
'is_protected' => false,
|
||||
'password' => null,
|
||||
'expire_in' => null,
|
||||
]);
|
||||
|
||||
// 6.
|
||||
$videohive = Folder::factory(Folder::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'author' => 'user',
|
||||
'name' => 'Videohive by MakingCG',
|
||||
'created_at' => now()->subMinutes(5),
|
||||
]);
|
||||
|
||||
$user
|
||||
->favouriteFolders()
|
||||
->sync([
|
||||
$shared_folder->id,
|
||||
$random_pics->id,
|
||||
$documents->id,
|
||||
$peters_files->id,
|
||||
]);
|
||||
|
||||
// Get documents to root directory
|
||||
collect([
|
||||
[
|
||||
'name' => 'Random Document',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'School Report',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Personal Savings',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'Top Secret Files',
|
||||
'basename' => 'Stories of the Night Skies.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($user) {
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => null,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to documents folder
|
||||
collect([
|
||||
[
|
||||
'name' => 'Home Improvement',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Project Notes',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Personal Savings',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'License',
|
||||
'basename' => 'Stories of the Night Skies.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($user, $documents) {
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $documents->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to shared folder
|
||||
collect([
|
||||
[
|
||||
'name' => 'Home plan',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Software Licence',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($user, $shared_folder) {
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $shared_folder->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to peter's files folder
|
||||
collect([
|
||||
[
|
||||
'name' => 'Project Backup',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Yearly report',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Work Update',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'Person Writing on Notebook',
|
||||
'basename' => 'Stories of the Night Skies.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'Blank Business Composition Computer',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => '2020 April - Export',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Ballpen Blur Close Up Computer',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($user, $peters_files) {
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $peters_files->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'visitor',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get videos
|
||||
collect([
|
||||
'Apple Watch App Video Promotion.mp4',
|
||||
'Professional 3D Device Pack for Element 3D.mp4',
|
||||
'Smart Watch 3D Device Pack for Element 3D.mp4',
|
||||
'Sphere Bound 3D Titles.mp4',
|
||||
])
|
||||
->each(function ($file) use ($user, $videohive) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/video/$file"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $videohive->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'video',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'mp4',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get video into video folder
|
||||
collect([
|
||||
'Apple Watch App Video Promotion.mp4',
|
||||
])
|
||||
->each(function ($file) use ($user, $video) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/video/$file"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $video->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'video',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'mp4',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get audios
|
||||
collect([
|
||||
'D-Block & S-te-Fan - Bla Bla.mp3',
|
||||
])
|
||||
->each(function ($file) use ($user, $audio) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/audio/$file"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $audio->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'audio',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'mp3',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get meme gallery
|
||||
collect([
|
||||
'Eggcited bro.jpg',
|
||||
'Get a Rest.jpg',
|
||||
'Get Your Shit Together.jpg',
|
||||
'Happiness is when you are right beside me.jpg',
|
||||
'Have a Nice Day.jpg',
|
||||
'It Works On My Machine.jpg',
|
||||
'I am Just Trying to shine.jpg',
|
||||
'It Works On My Machine.jpg',
|
||||
'Missing you It is Pig Time.jpg',
|
||||
'Sofishticated.jpg',
|
||||
'whaaaaat.jpg',
|
||||
'You Are My Sunshine.jpg',
|
||||
])
|
||||
->each(function ($file) use ($user) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/memes/$file"), $basename, 'private');
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/memes/thumbnail-$file"), "thumbnail-$basename", 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => null,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'thumbnail' => "thumbnail-$basename",
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get apartments gallery
|
||||
collect([
|
||||
'Apartment Architecture Ceiling Chairs.jpg',
|
||||
'Apartment Chair.jpg',
|
||||
'Apartment Contemporary Couch Curtains.jpg',
|
||||
'Brown Wooden Center Table.jpg',
|
||||
'Home.jpg',
|
||||
'Kitchen Appliances.jpg',
|
||||
'Kitchen Island.jpg',
|
||||
])
|
||||
->each(function ($file) use ($user, $apartments) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/apartments/$file"), $basename, 'private');
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/apartments/thumbnail-$file"), "thumbnail-$basename", 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $apartments->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'thumbnail' => "thumbnail-$basename",
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get nature gallery
|
||||
collect([
|
||||
'Bird Patterncolorful Green.jpg',
|
||||
'Close Up Of Peacock.jpg',
|
||||
'Close Up Photography Of Tiger.jpg',
|
||||
'Cold Nature Cute Ice.jpg',
|
||||
'Landscape Photo of Forest.jpg',
|
||||
'Photo of Hawksbill Sea Turtle.jpg',
|
||||
'Photo Of Reindeer in The Snow.jpg',
|
||||
'View Of Elephant in Water.jpg',
|
||||
'Waterfall Between Trees.jpg',
|
||||
'Wildlife Photography of Elephant During Golden Hour.jpg',
|
||||
'Yellow Animal Eyes Fur.jpg',
|
||||
])
|
||||
->each(function ($file) use ($user, $nature) {
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/nature/$file"), $basename, 'private');
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/images/nature/thumbnail-$file"), "thumbnail-$basename", 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'folder_id' => $nature->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'thumbnail' => "thumbnail-$basename",
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
private function create_share_records(): void
|
||||
{
|
||||
$user = User::whereEmail('howdy@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
$images = File::whereType('image')
|
||||
->whereFolderId(null)
|
||||
->take(3)
|
||||
->pluck('id');
|
||||
|
||||
$images->each(function ($id) use ($user) {
|
||||
Share::create([
|
||||
'user_id' => $user->id,
|
||||
'item_id' => $id,
|
||||
'type' => 'file',
|
||||
'is_protected' => false,
|
||||
'permission' => 'editor',
|
||||
'password' => null,
|
||||
'expire_in' => null,
|
||||
]);
|
||||
});
|
||||
|
||||
$files = File::whereType('file')
|
||||
->whereFolderId(null)
|
||||
->take(2)
|
||||
->pluck('id');
|
||||
|
||||
$files->each(function ($id) use ($user) {
|
||||
Share::create([
|
||||
'user_id' => $user->id,
|
||||
'item_id' => $id,
|
||||
'type' => 'file',
|
||||
'is_protected' => false,
|
||||
'permission' => 'editor',
|
||||
'password' => null,
|
||||
'expire_in' => null,
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Store main app settings into database
|
||||
*/
|
||||
private function store_default_settings(): void
|
||||
{
|
||||
// Get options
|
||||
collect([
|
||||
[
|
||||
'name' => 'setup_wizard_database',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'app_title',
|
||||
'value' => 'VueFileManager',
|
||||
],
|
||||
[
|
||||
'name' => 'app_description',
|
||||
'value' => 'Your self-hosted storage cloud software powered by Laravel and Vue',
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo',
|
||||
'value' => 'system/logo.svg',
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo_horizontal',
|
||||
'value' => 'system/logo-horizontal.svg',
|
||||
],
|
||||
[
|
||||
'name' => 'app_favicon',
|
||||
'value' => 'system/favicon.png',
|
||||
],
|
||||
[
|
||||
'name' => 'app_og_image',
|
||||
'value' => 'system/og-image.jpg',
|
||||
],
|
||||
[
|
||||
'name' => 'app_touch_icon',
|
||||
'value' => 'system/touch-icon.png',
|
||||
],
|
||||
[
|
||||
'name' => 'google_analytics',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'contact_email',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'registration',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'payments_active',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_limitation',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_default',
|
||||
'value' => 5,
|
||||
],
|
||||
[
|
||||
'name' => 'setup_wizard_success',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'license',
|
||||
'value' => $this->license,
|
||||
],
|
||||
[
|
||||
'name' => 'purchase_code',
|
||||
'value' => '26b889eb-3602-4bf2-beb3-3sc378fcf484',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_address',
|
||||
'value' => 'Palo Alto 20',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_city',
|
||||
'value' => 'Palo Alto',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_country',
|
||||
'value' => 'US',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_name',
|
||||
'value' => 'VueFileManager Inc.',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_phone_number',
|
||||
'value' => '312343141243214',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_postal_code',
|
||||
'value' => '43213',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_state',
|
||||
'value' => 'California',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_vat_number',
|
||||
'value' => '41241241234',
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
// Get system images
|
||||
collect(['logo.svg', 'logo-horizontal.svg', 'favicon.png', 'og-image.jpg', 'touch-icon.png'])
|
||||
->each(function ($file) {
|
||||
Storage::putFileAs('system', storage_path("demo/app/$file"), $file, 'private');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate database and generate application keys
|
||||
*/
|
||||
private function migrate_and_generate(): void
|
||||
{
|
||||
// Migrate database
|
||||
$this->call('migrate:fresh', [
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
// Generate app key
|
||||
$this->call('key:generate', [
|
||||
'--force' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear app cache
|
||||
*/
|
||||
private function clear_cache(): void
|
||||
{
|
||||
$this->call('cache:clear');
|
||||
$this->call('config:clear');
|
||||
$this->call('view:clear');
|
||||
}
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
<?php
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Setting;
|
||||
use App\Services\SetupService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class SetupProdEnvironment extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'setup:prod';
|
||||
protected $license = 'Extended';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Set up production environment';
|
||||
|
||||
private $setup;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setup = resolve(SetupService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Setting up production environment');
|
||||
|
||||
$this->info('Creating system directories...');
|
||||
$this->setup->create_directories();
|
||||
|
||||
$this->info('Migrating Databases...');
|
||||
$this->migrate_and_generate();
|
||||
|
||||
$this->info('Storing default settings and content...');
|
||||
$this->store_default_settings();
|
||||
$this->setup->seed_default_pages();
|
||||
$this->setup->seed_default_settings($this->license);
|
||||
$this->setup->seed_default_language();
|
||||
|
||||
$this->info('Creating default admin...');
|
||||
$this->create_admin();
|
||||
|
||||
$this->info('Clearing application cache...');
|
||||
$this->clear_cache();
|
||||
|
||||
$this->info('Everything is done, congratulations! 🥳🥳🥳');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store main app settings into database
|
||||
*/
|
||||
private function store_default_settings(): void
|
||||
{
|
||||
// Get options
|
||||
collect([
|
||||
[
|
||||
'name' => 'setup_wizard_database',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'app_title',
|
||||
'value' => 'VueFileManager',
|
||||
],
|
||||
[
|
||||
'name' => 'app_description',
|
||||
'value' => 'Your self-hosted storage cloud software powered by Laravel and Vue',
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo_horizontal',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'app_favicon',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'app_og_image',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'app_touch_icon',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'google_analytics',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'contact_email',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'registration',
|
||||
'value' => 0,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_limitation',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_default',
|
||||
'value' => 5,
|
||||
],
|
||||
[
|
||||
'name' => 'setup_wizard_success',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'license',
|
||||
'value' => $this->license,
|
||||
],
|
||||
[
|
||||
'name' => 'purchase_code',
|
||||
'value' => '26b889eb-3602-4bf2-beb3-3sc378fcf484',
|
||||
],
|
||||
[
|
||||
'name' => 'billing_address',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_city',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_country',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_name',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_phone_number',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_postal_code',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_state',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_vat_number',
|
||||
'value' => null,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default admin account
|
||||
*/
|
||||
private function create_admin(): void
|
||||
{
|
||||
$user = User::forceCreate([
|
||||
'role' => 'admin',
|
||||
'email' => 'howdy@hi5ve.digital',
|
||||
'password' => bcrypt('vuefilemanager'),
|
||||
]);
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
'storage_capacity' => 5,
|
||||
'name' => 'Admin',
|
||||
]);
|
||||
|
||||
// Show user credentials
|
||||
$this->info('Default admin account created. Email: howdy@hi5ve.digital and Password: vuefilemanager');
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate database and generate application keys
|
||||
*/
|
||||
private function migrate_and_generate(): void
|
||||
{
|
||||
// Migrate database
|
||||
$this->call('migrate:fresh', [
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
// Generate app key
|
||||
$this->call('key:generate', [
|
||||
'--force' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear app cache
|
||||
*/
|
||||
private function clear_cache(): void
|
||||
{
|
||||
$this->call('cache:clear');
|
||||
$this->call('config:clear');
|
||||
$this->call('view:clear');
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
namespace App\Console;
|
||||
|
||||
use App\Services\SchedulerService;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use App\Console\Commands\SetupDevEnvironment;
|
||||
use App\Console\Commands\SetupProdEnvironment;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
SetupDevEnvironment::class,
|
||||
SetupProdEnvironment::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$scheduler = resolve(SchedulerService::class);
|
||||
|
||||
$schedule->call(function () use ($scheduler) {
|
||||
$scheduler->delete_expired_shared_links();
|
||||
})->everyTenMinutes();
|
||||
|
||||
$schedule->call(function () use ($scheduler) {
|
||||
$scheduler->delete_old_zips();
|
||||
|
||||
if (! is_storage_driver(['local'])) {
|
||||
$scheduler->delete_failed_files();
|
||||
}
|
||||
})->everySixHours();
|
||||
|
||||
// Run queue jobs every minute
|
||||
$schedule->command('queue:work --stop-when-empty')
|
||||
->everyMinute()
|
||||
->withoutOverlapping();
|
||||
|
||||
// Backup app database daily
|
||||
$schedule->command('backup:clean')
|
||||
->daily()
|
||||
->at('01:00');
|
||||
$schedule->command('backup:run --only-db')
|
||||
->daily()
|
||||
->at('01:30');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__ . '/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\User;
|
||||
use ByteUnits\Metric;
|
||||
use App\Services\StripeService;
|
||||
use Laravel\Cashier\Subscription;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\UsersCollection;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
private StripeService $stripe;
|
||||
|
||||
public function __construct(StripeService $stripe)
|
||||
{
|
||||
$this->stripe = $stripe;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data for dashboard
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
// Get total premium users
|
||||
$premium_users = Subscription::whereStripeStatus('active')
|
||||
->count();
|
||||
|
||||
// Get total storage usage
|
||||
$storage_usage = Metric::bytes(
|
||||
\DB::table('files')->sum('filesize')
|
||||
)->format();
|
||||
|
||||
return [
|
||||
'license' => get_setting('license'),
|
||||
'app_version' => config('vuefilemanager.version'),
|
||||
'total_users' => User::count(),
|
||||
'total_used_space' => $storage_usage,
|
||||
'total_premium_users' => $premium_users,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the newest users
|
||||
*
|
||||
* @return UsersCollection
|
||||
*/
|
||||
public function newbies()
|
||||
{
|
||||
return new UsersCollection(
|
||||
User::sortable(['created_at' => 'desc'])
|
||||
->paginate(10)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Services\StripeService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\InvoiceResource;
|
||||
use App\Http\Resources\InvoiceAdminCollection;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
private StripeService $stripe;
|
||||
|
||||
public function __construct(StripeService $stripe)
|
||||
{
|
||||
$this->stripe = $stripe;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all invoices
|
||||
*
|
||||
* @return InvoiceAdminCollection
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return new InvoiceAdminCollection(
|
||||
$this->stripe->getInvoices()['data']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single invoice by invoice $token
|
||||
*
|
||||
* @param $customer
|
||||
* @param $token
|
||||
* @return InvoiceResource|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function show($customer, $token)
|
||||
{
|
||||
return view('vuefilemanager.invoice')
|
||||
->with('settings', get_settings_in_json())
|
||||
->with('invoice', $this->stripe->getUserInvoice($customer, $token));
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\Language;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\LanguageResource;
|
||||
use App\Http\Resources\LanguageCollection;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\Languages\UpdateStringRequest;
|
||||
use App\Http\Requests\Languages\CreateLanguageRequest;
|
||||
use App\Http\Requests\Languages\UpdateLanguageRequest;
|
||||
|
||||
class LanguageController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get all languages for admin translate
|
||||
*
|
||||
* @return array|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function get_languages()
|
||||
{
|
||||
return response(
|
||||
new LanguageCollection(Language::sortable(['created_at', 'DESC'])->get()),
|
||||
200
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all language strings for admin translate
|
||||
*
|
||||
* @param Language $language
|
||||
*/
|
||||
public function get_language(Language $language)
|
||||
{
|
||||
return response(
|
||||
new LanguageResource($language),
|
||||
200
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new language
|
||||
*
|
||||
* @param CreateLanguageRequest $request
|
||||
* @return string
|
||||
*/
|
||||
public function create_language(CreateLanguageRequest $request)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
$language = Language::create([
|
||||
'name' => $request->input('name'),
|
||||
'locale' => $request->input('locale'),
|
||||
]);
|
||||
|
||||
return response(
|
||||
new LanguageResource($language),
|
||||
201
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update language
|
||||
*
|
||||
* @param UpdateLanguageRequest $request
|
||||
* @param Language $language
|
||||
*/
|
||||
public function update_language(UpdateLanguageRequest $request, Language $language)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
$language->update(make_single_input($request));
|
||||
|
||||
return response(
|
||||
new LanguageResource($language),
|
||||
201
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update string for language
|
||||
*
|
||||
* @param UpdateStringRequest $request
|
||||
* @param Language $language
|
||||
* @return Application|ResponseFactory|Response
|
||||
*/
|
||||
public function update_string(UpdateStringRequest $request, Language $language)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
$language
|
||||
->languageTranslations()
|
||||
->where('key', $request->name)
|
||||
->update([
|
||||
'value' => $request->value,
|
||||
]);
|
||||
|
||||
cache()->forget("language-translations-{$language->locale}");
|
||||
|
||||
return response(
|
||||
'Done',
|
||||
204
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the language with all children strings
|
||||
* @param Language $language
|
||||
* @return Response
|
||||
*/
|
||||
public function delete_language(Language $language): Response
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
abort_if($language->locale === 'en', 401, "Sorry, you can't delete default language.");
|
||||
|
||||
// If user try to delete language used as default,
|
||||
// then set en language as default
|
||||
if ($language->locale === get_setting('language')) {
|
||||
Setting::whereName('language')->first()
|
||||
->update(['value' => 'en']);
|
||||
}
|
||||
|
||||
$language->delete();
|
||||
|
||||
return response(
|
||||
'Done',
|
||||
204
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Page;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\PageResource;
|
||||
use App\Http\Resources\PageCollection;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
class PagesController extends Controller
|
||||
{
|
||||
private $demo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all pages
|
||||
*
|
||||
* @return PageCollection
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return new PageCollection(
|
||||
Page::sortable()
|
||||
->paginate(10)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single page resource
|
||||
*
|
||||
* @param $page
|
||||
* @return PageResource
|
||||
*/
|
||||
public function show(Page $page)
|
||||
{
|
||||
return new PageResource($page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update page content
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Page $page
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function update(Request $request, Page $page)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
$page->update(
|
||||
make_single_input($request)
|
||||
);
|
||||
|
||||
return response(new PageResource($page), 204);
|
||||
}
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Plan;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\StripeService;
|
||||
use Laravel\Cashier\Subscription;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\PlanResource;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Http\Resources\PlanCollection;
|
||||
use App\Http\Resources\UsersCollection;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
class PlanController extends Controller
|
||||
{
|
||||
private StripeService $stripe;
|
||||
|
||||
private DemoService $demo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->stripe = resolve(StripeService::class);
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all plans
|
||||
*
|
||||
* @return PlanCollection|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
// Store or Get plans to cache
|
||||
if (Cache::has('plans')) {
|
||||
$plans = Cache::get('plans');
|
||||
} else {
|
||||
$plans = Cache::rememberForever('plans', function () {
|
||||
return $this->stripe->getPlans();
|
||||
});
|
||||
}
|
||||
|
||||
return response(new PlanCollection($plans), 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plan record
|
||||
*
|
||||
* @param $id
|
||||
* @return PlanResource|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
// Store or Get plan to cache
|
||||
if (Cache::has('plan-' . $id)) {
|
||||
$plan = Cache::get('plan-' . $id);
|
||||
} else {
|
||||
$plan = Cache::rememberForever('plan-' . $id, function () use ($id) {
|
||||
return $this->stripe->getPlan($id);
|
||||
});
|
||||
}
|
||||
|
||||
return response(new PlanResource($plan), 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new plan
|
||||
*
|
||||
* @param Request $request
|
||||
* @return PlanResource|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
// TODO: inline request
|
||||
if (is_demo()) {
|
||||
if (Cache::has('plan-starter-pack')) {
|
||||
$plan = Cache::get('plan-starter-pack');
|
||||
} else {
|
||||
$plan = Cache::rememberForever('plan-starter-pack', function () {
|
||||
return $this->stripe->getPlan('starter-pack');
|
||||
});
|
||||
}
|
||||
|
||||
return new PlanResource($plan);
|
||||
}
|
||||
|
||||
$plan = new PlanResource(
|
||||
$this->stripe->createPlan($request)
|
||||
);
|
||||
|
||||
// Clear cached plans
|
||||
cache_forget_many(['plans', 'pricing']);
|
||||
|
||||
return response($plan, 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update plan attribute
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $id
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
// Update plan
|
||||
$this->stripe->updatePlan($request, $id);
|
||||
|
||||
// Clear cached plans
|
||||
cache_forget_many(['plans', 'pricing', 'plan-' . $id]);
|
||||
|
||||
return response('Saved!', 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete plan
|
||||
*
|
||||
* @param $id
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
// Delete plan
|
||||
$this->stripe->deletePlan($id);
|
||||
|
||||
// Clear cached plans
|
||||
cache_forget_many(['plans', 'pricing']);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get subscriptions
|
||||
*
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function subscribers($id)
|
||||
{
|
||||
$subscribers = Subscription::whereStripePlan($id)
|
||||
->pluck('user_id');
|
||||
|
||||
return new UsersCollection(
|
||||
User::sortable()
|
||||
->findMany($subscribers)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Stripe;
|
||||
use Artisan;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Cartalyst\Stripe\Exception\UnauthorizedException;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class SettingController extends Controller
|
||||
{
|
||||
private $demo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table content
|
||||
*
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function show(Request $request)
|
||||
{
|
||||
if (strpos($request->column, '|') !== false) {
|
||||
$columns = explode('|', $request->column);
|
||||
|
||||
return Setting::whereIn('name', $columns)
|
||||
->pluck('value', 'name');
|
||||
}
|
||||
|
||||
return Setting::where('name', $request->column)
|
||||
->pluck('value', 'name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
// Store image if exist
|
||||
if ($request->hasFile($request->name)) {
|
||||
// Find and update image path
|
||||
Setting::updateOrCreate([
|
||||
'name' => $request->name,
|
||||
], [
|
||||
'value' => store_system_image($request, $request->name),
|
||||
]);
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
// Find and update variable
|
||||
Setting::updateOrCreate(
|
||||
['name' => $request->name],
|
||||
['value' => $request->value]
|
||||
);
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set new email credentials to .env file
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function set_email(Request $request)
|
||||
{
|
||||
// TODO: pridat validator do requestu
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
setEnvironmentValue([
|
||||
'MAIL_DRIVER' => $request->driver,
|
||||
'MAIL_HOST' => $request->host,
|
||||
'MAIL_PORT' => $request->port,
|
||||
'MAIL_USERNAME' => $request->username,
|
||||
'MAIL_PASSWORD' => $request->password,
|
||||
'MAIL_ENCRYPTION' => $request->encryption,
|
||||
]);
|
||||
|
||||
// Clear config cache
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure stripe additionally
|
||||
*
|
||||
* @param Request $request
|
||||
*/
|
||||
public function set_stripe(Request $request)
|
||||
{
|
||||
// TODO: pridat validator do requestu
|
||||
// Check payment setup status
|
||||
if (get_setting('payments_configured')) {
|
||||
abort(401, 'Gone');
|
||||
}
|
||||
|
||||
// Try to get stripe account details
|
||||
try {
|
||||
if (! app()->runningUnitTests()) {
|
||||
Stripe::make($request->secret, '2020-03-02')
|
||||
->account()
|
||||
->details();
|
||||
}
|
||||
} catch (UnauthorizedException $e) {
|
||||
throw new HttpException(401, $e->getMessage());
|
||||
}
|
||||
|
||||
// Get options
|
||||
collect([
|
||||
[
|
||||
'name' => 'stripe_currency',
|
||||
'value' => $request->currency,
|
||||
],
|
||||
[
|
||||
'name' => 'payments_configured',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'payments_active',
|
||||
'value' => 1,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
// Set stripe credentials to .env
|
||||
setEnvironmentValue([
|
||||
'CASHIER_CURRENCY' => $request->currency,
|
||||
'STRIPE_KEY' => $request->key,
|
||||
'STRIPE_SECRET' => $request->secret,
|
||||
'STRIPE_WEBHOOK_SECRET' => $request->webhookSecret,
|
||||
]);
|
||||
|
||||
// Clear cache
|
||||
Artisan::call('cache:clear');
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear application cache
|
||||
*/
|
||||
public function flush_cache()
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
Artisan::call('cache:clear');
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Storage;
|
||||
use App\Models\User;
|
||||
use App\Models\UserSettings;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\StripeService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\UserResource;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Resources\UsersCollection;
|
||||
use App\Http\Resources\UserSubscription;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use App\Http\Resources\InvoiceCollection;
|
||||
use App\Http\Resources\UserStorageResource;
|
||||
use App\Http\Requests\Admin\ChangeRoleRequest;
|
||||
use App\Http\Requests\Admin\CreateUserByAdmin;
|
||||
use App\Http\Requests\Admin\DeleteUserRequest;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\Admin\ChangeStorageCapacityRequest;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
private StripeService $stripe;
|
||||
|
||||
public function __construct(StripeService $stripe)
|
||||
{
|
||||
$this->stripe = $stripe;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user details
|
||||
*
|
||||
* @param User $user
|
||||
* @return UserResource
|
||||
*/
|
||||
public function details(User $user)
|
||||
{
|
||||
return new UserResource(
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user storage details
|
||||
*
|
||||
* @param User $user
|
||||
* @return UserStorageResource
|
||||
*/
|
||||
public function storage(User $user)
|
||||
{
|
||||
return new UserStorageResource(
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user storage details
|
||||
*
|
||||
* @param User $user
|
||||
* @return InvoiceCollection
|
||||
*/
|
||||
public function invoices(User $user)
|
||||
{
|
||||
return new InvoiceCollection(
|
||||
$this
|
||||
->stripe
|
||||
->getUserInvoices($user)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user subscription details
|
||||
*
|
||||
* @param User $user
|
||||
* @return UserSubscription|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function subscription(User $user)
|
||||
{
|
||||
if (! $user->stripeId() || ! $user->subscription('main')) {
|
||||
return response("User doesn't have any subscription.", 404);
|
||||
}
|
||||
|
||||
return new UserSubscription(
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all users
|
||||
*
|
||||
* @return UsersCollection
|
||||
*/
|
||||
public function users()
|
||||
{
|
||||
return new UsersCollection(
|
||||
User::sortable(['created_at', 'DESC'])
|
||||
->paginate(20)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change user role
|
||||
*
|
||||
* @param ChangeRoleRequest $request
|
||||
* @param User $user
|
||||
* @return UserResource
|
||||
*/
|
||||
public function change_role(ChangeRoleRequest $request, User $user)
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo_account('howdy@hi5ve.digial')) {
|
||||
return new UserResource($user);
|
||||
}
|
||||
|
||||
// Update user role
|
||||
$user->role = $request->input('attributes.role');
|
||||
$user->save();
|
||||
|
||||
return new UserResource(
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change user storage capacity
|
||||
*
|
||||
* @param ChangeStorageCapacityRequest $request
|
||||
* @param User $user
|
||||
* @return UserStorageResource
|
||||
*/
|
||||
public function change_storage_capacity(ChangeStorageCapacityRequest $request, User $user)
|
||||
{
|
||||
$user
|
||||
->settings()
|
||||
->update(
|
||||
$request->input('attributes')
|
||||
);
|
||||
|
||||
return new UserStorageResource(
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send user password reset link
|
||||
*
|
||||
* @param User $user
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function reset_password(User $user)
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo()) {
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
// Get password token
|
||||
$token = Password::getRepository()
|
||||
->create($user);
|
||||
|
||||
// Send user email
|
||||
$user->sendPasswordResetNotification($token);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new user by admin
|
||||
*
|
||||
* @param CreateUserByAdmin $request
|
||||
* @return UserResource|Application|ResponseFactory|Response
|
||||
*/
|
||||
public function create_user(CreateUserByAdmin $request)
|
||||
{
|
||||
// Create user
|
||||
$user = User::forceCreate([
|
||||
'role' => $request->role,
|
||||
'email' => $request->email,
|
||||
'password' => bcrypt($request->password),
|
||||
]);
|
||||
|
||||
UserSettings::unguard();
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
'name' => $request->name,
|
||||
'avatar' => store_avatar($request, 'avatar'),
|
||||
'storage_capacity' => $request->storage_capacity,
|
||||
]);
|
||||
|
||||
UserSettings::reguard();
|
||||
|
||||
return response(new UserResource($user), 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user with all user data
|
||||
*
|
||||
* @param DeleteUserRequest $request
|
||||
* @param User $user
|
||||
* @return ResponseFactory|Response
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function delete_user(DeleteUserRequest $request, User $user)
|
||||
{
|
||||
if (is_demo()) {
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
if ($user->subscribed('main')) {
|
||||
abort(202, "You can\'t delete this account while user have active subscription.");
|
||||
}
|
||||
|
||||
if ($user->id === Auth::id()) {
|
||||
abort(406, "You can\'t delete your account");
|
||||
}
|
||||
|
||||
if ($user->settings->name !== $request->name) {
|
||||
abort(403, 'The name you typed is wrong!');
|
||||
}
|
||||
|
||||
$user->delete();
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\App;
|
||||
|
||||
use App\Models\Page;
|
||||
use App\Models\Share;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Language;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\StripeService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\PageResource;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Mail\SendContactMessage;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Illuminate\Database\QueryException;
|
||||
use App\Http\Resources\PricingCollection;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use App\Http\Requests\PublicPages\SendContactMessageRequest;
|
||||
|
||||
class AppFunctionsController extends Controller
|
||||
{
|
||||
/**
|
||||
* List of allowed settings to get from public request
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private array $blacklist = [
|
||||
'purchase_code',
|
||||
'license',
|
||||
];
|
||||
|
||||
private StripeService $stripe;
|
||||
|
||||
public function __construct(StripeService $stripe)
|
||||
{
|
||||
$this->stripe = $stripe;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show index page
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
try {
|
||||
// Try to connect to database
|
||||
\DB::getPdo();
|
||||
|
||||
// Get setup status
|
||||
$setup_status = get_setup_status();
|
||||
|
||||
// Get app pages
|
||||
$pages = Page::all();
|
||||
|
||||
// Get all settings
|
||||
$settings = get_settings_in_json();
|
||||
} catch (PDOException $e) {
|
||||
$setup_status = 'setup-database';
|
||||
}
|
||||
|
||||
return view('index')
|
||||
->with('settings', $settings ?? null)
|
||||
->with('legal', $pages ?? null)
|
||||
->with('installation', $setup_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get og site for web crawlers
|
||||
*
|
||||
* @param Share $shared
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function og_site(Share $shared)
|
||||
{
|
||||
// Get file/folder record
|
||||
$item = ('App\\Models\\' . ucfirst($shared->type))
|
||||
::where('user_id', $shared->user->id)
|
||||
->where('id', $shared->item_id)
|
||||
->first();
|
||||
|
||||
if ($item->thumbnail) {
|
||||
$item->setPublicUrl($shared->token);
|
||||
}
|
||||
|
||||
return view('vuefilemanager.crawler.og-view')
|
||||
->with('settings', get_settings_in_json())
|
||||
->with('metadata', [
|
||||
'url' => url('/share', ['token' => $shared->token]),
|
||||
'is_protected' => $shared->is_protected,
|
||||
'user' => $shared->user->settings->name,
|
||||
'name' => $item->name,
|
||||
'size' => $shared->type === 'folder'
|
||||
? $item->items
|
||||
: $item->filesize,
|
||||
'thumbnail' => $item->thumbnail ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send contact message from pages
|
||||
*
|
||||
* @param SendContactMessageRequest $request
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function contact_form(SendContactMessageRequest $request)
|
||||
{
|
||||
Mail::to(
|
||||
get_setting('contact_email')
|
||||
)->send(
|
||||
new SendContactMessage($request->all())
|
||||
);
|
||||
|
||||
return response('Done', 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single page content
|
||||
*
|
||||
* @param Page $page
|
||||
* @return PageResource
|
||||
*/
|
||||
public function get_page(Page $page)
|
||||
{
|
||||
return new PageResource($page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selected settings from public route
|
||||
*
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_setting_columns(Request $request)
|
||||
{
|
||||
if (strpos($request->column, '|') !== false) {
|
||||
$columns = collect(explode('|', $request->column))
|
||||
->each(function ($column) {
|
||||
if (in_array($column, $this->blacklist)) {
|
||||
abort(401);
|
||||
}
|
||||
});
|
||||
|
||||
return Setting::whereIn('name', $columns)
|
||||
->pluck('value', 'name');
|
||||
}
|
||||
|
||||
if (in_array($request->column, $this->blacklist)) {
|
||||
abort(401);
|
||||
}
|
||||
|
||||
return Setting::where('name', $request->column)
|
||||
->pluck('value', 'name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all active storage plans
|
||||
*
|
||||
* @return PricingCollection
|
||||
*/
|
||||
public function get_storage_plans()
|
||||
{
|
||||
// Get pricing from cache
|
||||
$pricing = Cache::rememberForever('pricing', function () {
|
||||
return $this->stripe->getActivePlans();
|
||||
});
|
||||
|
||||
// Format pricing to collection
|
||||
$collection = new PricingCollection($pricing);
|
||||
|
||||
// Sort and return pricing
|
||||
return $collection
|
||||
->sortBy('product.metadata.capacity')
|
||||
->values()
|
||||
->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get language translations for frontend app
|
||||
*/
|
||||
public function get_translations($lang)
|
||||
{
|
||||
$translations = cache()
|
||||
->rememberForever("language-translations-$lang", function () use ($lang) {
|
||||
try {
|
||||
return Language::whereLocale($lang)
|
||||
->firstOrFail()
|
||||
->languageTranslations;
|
||||
} catch (QueryException | ModelNotFoundException $e) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
return $translations
|
||||
? map_language_translations($translations)
|
||||
: get_default_language_translations();
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\App;
|
||||
|
||||
use Gate;
|
||||
use Artisan;
|
||||
use App\Models\Language;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\LanguageService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
class Maintenance extends Controller
|
||||
{
|
||||
/**
|
||||
* Start maintenance mode
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// Check admin permission
|
||||
Gate::authorize('maintenance');
|
||||
|
||||
$command = Artisan::call('up');
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'System is in production mode';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* End maintenance mode
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// Check admin permission
|
||||
Gate::authorize('maintenance');
|
||||
|
||||
$command = Artisan::call('down');
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'System is in maintenance mode';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get new language translations from default translations
|
||||
* and insert it into database
|
||||
*
|
||||
* @return Application|ResponseFactory|Response
|
||||
*/
|
||||
public function upgrade_translations()
|
||||
{
|
||||
// Check admin permission
|
||||
Gate::authorize('maintenance');
|
||||
|
||||
resolve(LanguageService::class)
|
||||
->upgrade_language_translations();
|
||||
|
||||
return response('Done.', 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|mixed
|
||||
*/
|
||||
public function upgrade_database()
|
||||
{
|
||||
// Check admin permission
|
||||
Gate::authorize('maintenance');
|
||||
|
||||
$command = Artisan::call('migrate', [
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'Operation was successful.';
|
||||
}
|
||||
|
||||
if ($command === 1) {
|
||||
echo 'Operation failed.';
|
||||
}
|
||||
|
||||
return $command;
|
||||
}
|
||||
}
|
||||
@@ -1,479 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\App;
|
||||
|
||||
use Schema;
|
||||
use Stripe;
|
||||
use Artisan;
|
||||
use App\Models\User;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\SetupService;
|
||||
use App\Services\StripeService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Cartalyst\Stripe\Exception\UnauthorizedException;
|
||||
use App\Http\Requests\SetupWizard\StoreAppSetupRequest;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use App\Http\Requests\SetupWizard\StoreStripePlansRequest;
|
||||
use App\Http\Requests\SetupWizard\StoreStripeBillingRequest;
|
||||
use App\Http\Requests\SetupWizard\StoreEnvironmentSetupRequest;
|
||||
use App\Http\Requests\SetupWizard\StoreStripeCredentialsRequest;
|
||||
use App\Http\Requests\SetupWizard\StoreDatabaseCredentialsRequest;
|
||||
|
||||
class SetupWizardController extends Controller
|
||||
{
|
||||
/**
|
||||
* Inject Stripe Service
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->stripe = resolve(StripeService::class);
|
||||
$this->setup = resolve(SetupService::class);
|
||||
|
||||
$this->check_setup_status();
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify Envato purchase code
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response|mixed
|
||||
*/
|
||||
public function verify_purchase_code(Request $request)
|
||||
{
|
||||
// Verify purchase code
|
||||
$response = Http::get('https://verify.vuefilemanager.com/api/verify-code/' . $request->purchaseCode);
|
||||
|
||||
if ($response->successful()) {
|
||||
return response($response, 204);
|
||||
}
|
||||
|
||||
return response('Purchase code is invalid.', 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up database credentials
|
||||
*
|
||||
* @param StoreDatabaseCredentialsRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function setup_database(StoreDatabaseCredentialsRequest $request)
|
||||
{
|
||||
if (! app()->runningUnitTests()) {
|
||||
try {
|
||||
// Set temporary database connection
|
||||
config(['database.connections.test.driver' => $request->connection]);
|
||||
config(['database.connections.test.host' => $request->host]);
|
||||
config(['database.connections.test.port' => $request->port]);
|
||||
config(['database.connections.test.database' => $request->name]);
|
||||
config(['database.connections.test.username' => $request->username]);
|
||||
config(['database.connections.test.password' => $request->password]);
|
||||
|
||||
// Test connection
|
||||
\DB::connection('test')->getPdo();
|
||||
} catch (PDOException $e) {
|
||||
throw new HttpException(500, $e->getMessage());
|
||||
}
|
||||
|
||||
// TODO: add SANCTUM_STATEFUL_DOMAINS parameter
|
||||
|
||||
setEnvironmentValue([
|
||||
'DB_CONNECTION' => $request->connection,
|
||||
'DB_HOST' => $request->host,
|
||||
'DB_PORT' => $request->port,
|
||||
'DB_DATABASE' => $request->name,
|
||||
'DB_USERNAME' => $request->username,
|
||||
'DB_PASSWORD' => $request->password,
|
||||
]);
|
||||
|
||||
Artisan::call('config:cache');
|
||||
|
||||
Artisan::call('key:generate', [
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
Artisan::call('migrate:fresh', [
|
||||
'--force' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
// Store setup wizard progress
|
||||
Setting::forceCreate([
|
||||
'name' => 'setup_wizard_database',
|
||||
'value' => 1,
|
||||
]);
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store and test stripe credentials
|
||||
*
|
||||
* @param StoreStripeCredentialsRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store_stripe_credentials(StoreStripeCredentialsRequest $request)
|
||||
{
|
||||
if (! app()->runningUnitTests()) {
|
||||
// Create stripe instance
|
||||
$stripe = Stripe::make($request->secret, '2020-03-02');
|
||||
|
||||
try {
|
||||
// Try to get stripe account details
|
||||
$stripe->account()->details();
|
||||
} catch (UnauthorizedException $e) {
|
||||
throw new HttpException(401, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// Set settings
|
||||
collect([
|
||||
[
|
||||
'name' => 'stripe_currency',
|
||||
'value' => $request->currency,
|
||||
],
|
||||
[
|
||||
'name' => 'payments_configured',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'payments_active',
|
||||
'value' => 1,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
// Set stripe credentials to .env
|
||||
setEnvironmentValue([
|
||||
'CASHIER_CURRENCY' => $request->currency,
|
||||
'STRIPE_KEY' => $request->key,
|
||||
'STRIPE_SECRET' => $request->secret,
|
||||
'STRIPE_WEBHOOK_SECRET' => $request->webhookSecret,
|
||||
]);
|
||||
|
||||
// Clear cache
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store Stripe billings
|
||||
*
|
||||
* @param StoreStripeBillingRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store_stripe_billings(StoreStripeBillingRequest $request)
|
||||
{
|
||||
// Get options
|
||||
collect([
|
||||
[
|
||||
'name' => 'billing_phone_number',
|
||||
'value' => $request->billing_phone_number,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_postal_code',
|
||||
'value' => $request->billing_postal_code,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_vat_number',
|
||||
'value' => $request->billing_vat_number,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_address',
|
||||
'value' => $request->billing_address,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_country',
|
||||
'value' => $request->billing_country,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_state',
|
||||
'value' => $request->billing_state,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_city',
|
||||
'value' => $request->billing_city,
|
||||
],
|
||||
[
|
||||
'name' => 'billing_name',
|
||||
'value' => $request->billing_name,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Stripe subscription plan
|
||||
*
|
||||
* @param StoreStripePlansRequest $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store_stripe_plans(StoreStripePlansRequest $request)
|
||||
{
|
||||
foreach ($request->plans as $plan) {
|
||||
$this->stripe->createPlan($plan);
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store environment setup
|
||||
*
|
||||
* @param StoreEnvironmentSetupRequest $request
|
||||
* @return string
|
||||
*/
|
||||
public function store_environment_setup(StoreEnvironmentSetupRequest $request)
|
||||
{
|
||||
if (! app()->runningUnitTests()) {
|
||||
$drivers = [
|
||||
'local' => [
|
||||
'FILESYSTEM_DRIVER' => 'local',
|
||||
],
|
||||
's3' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'AWS_ACCESS_KEY_ID' => $request->storage['key'] ?? null,
|
||||
'AWS_SECRET_ACCESS_KEY' => $request->storage['secret'] ?? null,
|
||||
'AWS_DEFAULT_REGION' => $request->storage['region'] ?? null,
|
||||
'AWS_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'spaces' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'DO_SPACES_KEY' => $request->storage['key'] ?? null,
|
||||
'DO_SPACES_SECRET' => $request->storage['secret'] ?? null,
|
||||
'DO_SPACES_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'DO_SPACES_REGION' => $request->storage['region'] ?? null,
|
||||
'DO_SPACES_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'wasabi' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'WASABI_KEY' => $request->storage['key'] ?? null,
|
||||
'WASABI_SECRET' => $request->storage['secret'] ?? null,
|
||||
'WASABI_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'WASABI_REGION' => $request->storage['region'] ?? null,
|
||||
'WASABI_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'backblaze' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'BACKBLAZE_KEY' => $request->storage['key'] ?? null,
|
||||
'BACKBLAZE_SECRET' => $request->storage['secret'] ?? null,
|
||||
'BACKBLAZE_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'BACKBLAZE_REGION' => $request->storage['region'] ?? null,
|
||||
'BACKBLAZE_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'oss' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'OSS_ACCESS_KEY_ID' => $request->storage['key'] ?? null,
|
||||
'OSS_SECRET_ACCESS_KEY' => $request->storage['secret'] ?? null,
|
||||
'OSS_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'OSS_REGION' => $request->storage['region'] ?? null,
|
||||
'OSS_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
];
|
||||
|
||||
// Storage credentials for storage
|
||||
setEnvironmentValue(
|
||||
$drivers[$request->storage['driver']]
|
||||
);
|
||||
|
||||
// Store credentials for mail
|
||||
// TODO: add options for mailgun
|
||||
setEnvironmentValue([
|
||||
'MAIL_DRIVER' => $request->mail['driver'],
|
||||
'MAIL_HOST' => $request->mail['host'],
|
||||
'MAIL_PORT' => $request->mail['port'],
|
||||
'MAIL_USERNAME' => $request->mail['username'],
|
||||
'MAIL_PASSWORD' => $request->mail['password'],
|
||||
'MAIL_ENCRYPTION' => $request->mail['encryption'],
|
||||
]);
|
||||
|
||||
Artisan::call('config:cache');
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store app settings
|
||||
* @param StoreAppSetupRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store_app_settings(StoreAppSetupRequest $request)
|
||||
{
|
||||
// Get options
|
||||
collect([
|
||||
[
|
||||
'name' => 'app_title',
|
||||
'value' => $request->title,
|
||||
],
|
||||
[
|
||||
'name' => 'app_description',
|
||||
'value' => $request->description,
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo',
|
||||
'value' => store_system_image($request, 'logo'),
|
||||
],
|
||||
[
|
||||
'name' => 'app_logo_horizontal',
|
||||
'value' => store_system_image($request, 'logo_horizontal'),
|
||||
],
|
||||
[
|
||||
'name' => 'app_favicon',
|
||||
'value' => store_system_image($request, 'favicon'),
|
||||
],
|
||||
[
|
||||
'name' => 'app_og_image',
|
||||
'value' => store_system_image($request, 'og_image'),
|
||||
],
|
||||
[
|
||||
'name' => 'app_touch_icon',
|
||||
'value' => store_system_image($request, 'touch_icon'),
|
||||
],
|
||||
[
|
||||
'name' => 'google_analytics',
|
||||
'value' => $request->googleAnalytics,
|
||||
],
|
||||
[
|
||||
'name' => 'contact_email',
|
||||
'value' => $request->contactMail,
|
||||
],
|
||||
[
|
||||
'name' => 'registration',
|
||||
'value' => $request->userRegistration,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_limitation',
|
||||
'value' => $request->storageLimitation,
|
||||
],
|
||||
[
|
||||
'name' => 'storage_default',
|
||||
'value' => $request->defaultStorage ?? 5,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
if (! app()->runningUnitTests()) {
|
||||
setEnvironmentValue([
|
||||
'APP_NAME' => Str::camel($request->title),
|
||||
]);
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and login admin account
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function create_admin_account(Request $request)
|
||||
{
|
||||
// Validate request
|
||||
// TODO: validator do requestu
|
||||
$request->validate([
|
||||
'email' => 'required|string|email|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
'name' => 'required|string',
|
||||
'purchase_code' => 'required|string',
|
||||
'license' => 'required|string',
|
||||
'avatar' => 'sometimes|file',
|
||||
]);
|
||||
|
||||
// Create user
|
||||
$user = User::forceCreate([
|
||||
'role' => 'admin',
|
||||
'email' => $request->email,
|
||||
'password' => bcrypt($request->password),
|
||||
]);
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
'storage_capacity' => get_setting('storage_default') ?? 5,
|
||||
'avatar' => store_avatar($request, 'avatar'),
|
||||
'name' => $request->name,
|
||||
]);
|
||||
|
||||
collect([
|
||||
[
|
||||
'name' => 'setup_wizard_success',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'license',
|
||||
'value' => $request->license,
|
||||
],
|
||||
[
|
||||
'name' => 'purchase_code',
|
||||
'value' => $request->purchase_code,
|
||||
],
|
||||
])->each(function ($col) {
|
||||
Setting::forceCreate([
|
||||
'name' => $col['name'],
|
||||
'value' => $col['value'],
|
||||
]);
|
||||
});
|
||||
|
||||
// Set up application
|
||||
$this->setup->seed_default_pages();
|
||||
$this->setup->seed_default_settings($request->license);
|
||||
$this->setup->seed_default_language();
|
||||
|
||||
// Login account
|
||||
if (Auth::attempt($request->only(['email', 'password']))) {
|
||||
$request->session()->regenerate();
|
||||
|
||||
return response('Registration was successful', 204);
|
||||
}
|
||||
|
||||
return response('Something went wrong', 500);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get setup wizard status
|
||||
*
|
||||
* @return false | null
|
||||
*/
|
||||
private function check_setup_status()
|
||||
{
|
||||
try {
|
||||
// Check database connections
|
||||
DB::getPdo();
|
||||
|
||||
// Get setup_wizard status
|
||||
if (Schema::hasTable('settings') && get_setting('setup_wizard_success')) {
|
||||
abort(410, 'Gone');
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Auth\CheckAccountRequest;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
/**
|
||||
* Check if user account exist
|
||||
*
|
||||
* @param CheckAccountRequest $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function check_account(CheckAccountRequest $request)
|
||||
{
|
||||
// Get User
|
||||
$user = User::whereEmail($request->email)
|
||||
->first();
|
||||
|
||||
if (! $user) {
|
||||
return response(__t('user_not_fount'), 404);
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $user->settings->name,
|
||||
'avatar' => $user->settings->avatar,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\User;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Requests\FileBrowser\SearchRequest;
|
||||
|
||||
class BrowseController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get directory with files
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $id
|
||||
* @return Collection
|
||||
*/
|
||||
public function folder(Request $request, $id)
|
||||
{
|
||||
$root_id = $id === 'undefined' ? null : $id;
|
||||
|
||||
// Get folder trash items
|
||||
if ($request->query('trash')) {
|
||||
// Get folders and files
|
||||
$folders = Folder::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('parent_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('folder_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])->collapse();
|
||||
}
|
||||
|
||||
// Get folders and files
|
||||
$folders = Folder::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('parent_id', $root_id)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('folder_id', $root_id)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get latest user uploads
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function latest()
|
||||
{
|
||||
$user = User::with(['latest_uploads' => function ($query) {
|
||||
$query->sortable(['created_at' => 'desc']);
|
||||
}])
|
||||
->where('id', Auth::id())
|
||||
->first();
|
||||
|
||||
return $user->latest_uploads;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get trashed files
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function trash()
|
||||
{
|
||||
$user_id = Auth::id();
|
||||
|
||||
// Get folders and files
|
||||
$folders_trashed = Folder::onlyTrashed()
|
||||
->with(['trashed_folders', 'parent'])
|
||||
->where('user_id', $user_id)
|
||||
->get(['parent_id', 'id', 'name']);
|
||||
|
||||
$folders = Folder::onlyTrashed()
|
||||
->with(['parent'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('id', filter_folders_ids($folders_trashed))
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Get files trashed
|
||||
$files_trashed = File::onlyTrashed()
|
||||
->with(['parent'])
|
||||
->where('user_id', $user_id)
|
||||
->where(function ($query) use ($folders_trashed) {
|
||||
$query->whereNull('folder_id');
|
||||
$query->orWhereNotIn('folder_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
|
||||
})
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files_trashed])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user shared items
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function shared()
|
||||
{
|
||||
$user_id = Auth::id();
|
||||
|
||||
// Get shared folders and files
|
||||
$folder_ids = Share::where('user_id', $user_id)
|
||||
->where('type', 'folder')
|
||||
->pluck('item_id');
|
||||
|
||||
$file_ids = Share::where('user_id', $user_id)
|
||||
->where('type', '!=', 'folder')
|
||||
->pluck('item_id');
|
||||
|
||||
// Get folders and files
|
||||
$folders = Folder::with(['parent', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('id', $folder_ids)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::with(['parent', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('id', $file_ids)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get participant uploads
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function participant_uploads()
|
||||
{
|
||||
return File::with(['parent'])
|
||||
->where('user_id', Auth::id())
|
||||
->whereAuthor('visitor')
|
||||
->sortable()
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user folder tree
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function navigation_tree()
|
||||
{
|
||||
$folders = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('parent_id', null)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'id', 'name']);
|
||||
|
||||
return [
|
||||
[
|
||||
'name' => __t('home'),
|
||||
'location' => 'base',
|
||||
'folders' => $folders,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Search files
|
||||
*
|
||||
* @param SearchRequest $request
|
||||
* @return Collection
|
||||
*/
|
||||
public function search(SearchRequest $request)
|
||||
{
|
||||
$user_id = Auth::id();
|
||||
|
||||
$query = remove_accents($request->input('query'));
|
||||
|
||||
// Search files id db
|
||||
$searched_files = File::search($query)
|
||||
->where('user_id', $user_id)
|
||||
->get();
|
||||
|
||||
$searched_folders = Folder::search($query)
|
||||
->where('user_id', $user_id)
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$searched_folders, $searched_files])
|
||||
->collapse();
|
||||
}
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use Exception;
|
||||
use App\Models\File;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Services\HelperService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\FileManagerService;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\FileFunctions\UploadRequest;
|
||||
use App\Http\Requests\FileFunctions\MoveItemRequest;
|
||||
use App\Http\Requests\FileFunctions\DeleteItemRequest;
|
||||
use App\Http\Requests\FileFunctions\RenameItemRequest;
|
||||
use App\Http\Requests\FileFunctions\CreateFolderRequest;
|
||||
|
||||
class EditItemsController extends Controller
|
||||
{
|
||||
private $filemanager;
|
||||
private $helper;
|
||||
private $demo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->filemanager = resolve(FileManagerService::class);
|
||||
$this->helper = resolve(HelperService::class);
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new folder for authenticated master|editor user
|
||||
*
|
||||
* @param CreateFolderRequest $request
|
||||
* @return Folder|array|Model
|
||||
* @throws Exception
|
||||
*/
|
||||
public function create_folder(CreateFolderRequest $request)
|
||||
{
|
||||
if (is_demo_account('howdy@hi5ve.digital')) {
|
||||
return $this->demo->create_folder($request);
|
||||
}
|
||||
|
||||
// Create new folder
|
||||
return $this->filemanager->create_folder($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename item for authenticated master|editor user
|
||||
*
|
||||
* @param RenameItemRequest $request
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function rename_item(RenameItemRequest $request, $id)
|
||||
{
|
||||
if (is_demo_account('howdy@hi5ve.digital')) {
|
||||
return $this->demo->rename_item($request, $id);
|
||||
}
|
||||
|
||||
// If request contain icon or color, then change it
|
||||
if ($request->filled('emoji') || $request->filled('color')) {
|
||||
$this->filemanager->edit_folder_properties($request, $id);
|
||||
}
|
||||
|
||||
// Rename Item
|
||||
return $this->filemanager->rename_item($request, $id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete item for authenticated master|editor user
|
||||
*
|
||||
* @param DeleteItemRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete_item(DeleteItemRequest $request)
|
||||
{
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
foreach ($request->input('items') as $item) {
|
||||
$this->filemanager->delete_item($item, $item['id']);
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload file for authenticated master|editor user
|
||||
*
|
||||
* @param UploadRequest $request
|
||||
* @return array|Model|\Illuminate\Support\Facades\File
|
||||
* @throws Exception
|
||||
*/
|
||||
public function upload(UploadRequest $request)
|
||||
{
|
||||
if (is_demo_account('howdy@hi5ve.digital')) {
|
||||
return $this->demo->upload($request);
|
||||
}
|
||||
|
||||
return $this->filemanager->upload($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move item for authenticated master|editor user
|
||||
*
|
||||
* @param MoveItemRequest $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function move(MoveItemRequest $request)
|
||||
{
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
$this->filemanager->move($request, $request->to_id);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* User download folder via zip
|
||||
*
|
||||
* @param $id
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_folder($id)
|
||||
{
|
||||
$folder = Folder::whereUserId(Auth::id())
|
||||
->where('id', $id);
|
||||
|
||||
if (! $folder->exists()) {
|
||||
abort(404, "Requested folder doesn't exists.");
|
||||
}
|
||||
|
||||
$zip = $this->filemanager->zip_folder($id);
|
||||
|
||||
return response([
|
||||
'url' => route('zip', $zip->id),
|
||||
'name' => $zip->basename,
|
||||
], 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* User download multiple files via zip
|
||||
*
|
||||
* @param Request $request
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_multiple_files(Request $request)
|
||||
{
|
||||
$files = File::whereUserId(Auth::id())
|
||||
->whereIn('id', $request->input('items'))
|
||||
->get();
|
||||
|
||||
$zip = $this->filemanager->zip_files($files);
|
||||
|
||||
return response([
|
||||
'url' => route('zip', $zip->id),
|
||||
'name' => $zip->basename,
|
||||
], 201);
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class FavouriteController extends Controller
|
||||
{
|
||||
/**
|
||||
* FavouriteController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add folder to user favourites
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
// todo: pridat validator ako AddToFavouritesRequest
|
||||
|
||||
foreach ($request->folders as $id) {
|
||||
// Get user & folder
|
||||
$user = Auth::user();
|
||||
|
||||
if (is_demo($user->id)) {
|
||||
return $this->demo->favourites($user);
|
||||
}
|
||||
|
||||
// Add folder to user favourites
|
||||
$user
|
||||
->favouriteFolders()
|
||||
->syncWithoutDetaching($id);
|
||||
}
|
||||
|
||||
// Return updated favourites
|
||||
return response($user->favouriteFolders, 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove folder from user favourites
|
||||
*
|
||||
* @param $id
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
if (is_demo($user->id)) {
|
||||
return $this->demo->favourites($user);
|
||||
}
|
||||
|
||||
// Remove folder from user favourites
|
||||
$user->favouriteFolders()->detach($id);
|
||||
|
||||
// Return updated favourites
|
||||
return response($user->favouriteFolders, 204);
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use App\Models\Zip;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\HelperService;
|
||||
use App\Models\File as UserFile;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class FileAccessController extends Controller
|
||||
{
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->helper = resolve(HelperService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get avatar
|
||||
*
|
||||
* @param $basename
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function get_avatar($basename)
|
||||
{
|
||||
// Check if file exist
|
||||
if (! Storage::exists("/avatars/$basename")) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
// Return avatar
|
||||
return Storage::download("/avatars/$basename", $basename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get system image
|
||||
*
|
||||
* @param $basename
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function get_system_image($basename)
|
||||
{
|
||||
// Check if file exist
|
||||
if (! Storage::exists("/system/$basename")) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
// Return avatar
|
||||
return Storage::download("/system/$basename", $basename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $filename
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function get_file(Request $request, $filename)
|
||||
{
|
||||
// Get file record
|
||||
$file = UserFile::withTrashed()
|
||||
->where('user_id', Auth::id())
|
||||
->where('basename', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
// Check user permission
|
||||
/*if (!$request->user()->tokenCan('master')) {
|
||||
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
|
||||
// Check access to file
|
||||
$this->check_file_access($shared, $file);
|
||||
}*/
|
||||
|
||||
// Store user download size
|
||||
$request->user()->record_download(
|
||||
(int) $file->getRawOriginal('filesize')
|
||||
);
|
||||
|
||||
return $this->helper->download_file($file, Auth::id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated zip for user
|
||||
*
|
||||
* @param $id
|
||||
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
public function get_zip($id)
|
||||
{
|
||||
$disk = Storage::disk('local');
|
||||
|
||||
$zip = Zip::whereId($id)
|
||||
->where('user_id', Auth::id())
|
||||
->firstOrFail();
|
||||
|
||||
$zip
|
||||
->user
|
||||
->record_download(
|
||||
$disk->size("zip/$zip->basename")
|
||||
);
|
||||
|
||||
return $disk->download("zip/$zip->basename", $zip->basename, [
|
||||
'Content-Type' => 'application/zip',
|
||||
'Content-Length' => $disk->size("zip/$zip->basename"),
|
||||
'Accept-Ranges' => 'bytes',
|
||||
'Content-Range' => 'bytes 0-600/' . $disk->size("zip/$zip->basename"),
|
||||
'Content-Disposition' => "attachment; filename=$zip->basename",
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image thumbnail
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $filename
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function get_thumbnail(Request $request, $filename)
|
||||
{
|
||||
// Get file record
|
||||
$file = UserFile::withTrashed()
|
||||
->whereUserId(Auth::id())
|
||||
->whereThumbnail($filename)
|
||||
->firstOrFail();
|
||||
|
||||
// Check user permission
|
||||
/*if (!$request->user()->tokenCan('master')) {
|
||||
$this->check_file_access($request, $file);
|
||||
}*/
|
||||
|
||||
return $this->helper->download_thumbnail_file($file, Auth::id());
|
||||
}
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use Validator;
|
||||
use App\Models\Zip;
|
||||
use App\Models\Share;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Resources\ShareResource;
|
||||
use App\Notifications\SharedSendViaEmail;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use App\Http\Requests\Share\CreateShareRequest;
|
||||
use App\Http\Requests\Share\UpdateShareRequest;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
class ShareController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get shared record
|
||||
*
|
||||
* @param Share $shared
|
||||
* @return ShareResource
|
||||
*/
|
||||
public function show(Share $shared)
|
||||
{
|
||||
return new ShareResource(
|
||||
$shared
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate file share link
|
||||
*
|
||||
* @param CreateShareRequest $request
|
||||
* @param $id
|
||||
* @return ShareResource
|
||||
*/
|
||||
public function store(CreateShareRequest $request, $id)
|
||||
{
|
||||
// Create shared options
|
||||
$shared = Share::create([
|
||||
'password' => $request->has('password') ? bcrypt($request->password) : null,
|
||||
'type' => $request->type === 'folder' ? 'folder' : 'file',
|
||||
'is_protected' => $request->isPassword,
|
||||
'permission' => $request->permission ?? null,
|
||||
'item_id' => $id,
|
||||
'expire_in' => $request->expiration ?? null,
|
||||
'user_id' => Auth::id(),
|
||||
]);
|
||||
|
||||
// Send shared link via email
|
||||
if ($request->has('emails')) {
|
||||
foreach ($request->emails as $email) {
|
||||
Notification::route('mail', $email)->notify(
|
||||
new SharedSendViaEmail($shared->token)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Return created shared record
|
||||
return new ShareResource($shared);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update sharing
|
||||
*
|
||||
* @param UpdateShareRequest $request
|
||||
* @param $token
|
||||
* @return ShareResource
|
||||
*/
|
||||
public function update(UpdateShareRequest $request, $token)
|
||||
{
|
||||
// Get sharing record
|
||||
$shared = Share::where('token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->firstOrFail();
|
||||
|
||||
// Update sharing record
|
||||
$shared->update([
|
||||
'permission' => $request->permission,
|
||||
'is_protected' => $request->protected,
|
||||
'expire_in' => $request->expiration,
|
||||
'password' => $request->password ? bcrypt($request->password) : $shared->password,
|
||||
]);
|
||||
|
||||
// Return shared record
|
||||
return new ShareResource($shared);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete sharing item
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Request $request)
|
||||
{
|
||||
foreach ($request->tokens as $token) {
|
||||
// Get sharing record
|
||||
Share::where('token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->firstOrFail()
|
||||
->delete();
|
||||
|
||||
// Get zip record
|
||||
$zip = Zip::where('shared_token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->first();
|
||||
|
||||
if ($zip) {
|
||||
$zip->delete();
|
||||
}
|
||||
}
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send shared link via email to recipients
|
||||
*
|
||||
* @param $token
|
||||
* @param $request
|
||||
*/
|
||||
public function send_to_emails_recipients(Request $request, $token)
|
||||
{
|
||||
// TODO: pridat validation request
|
||||
// Make validation of array of emails
|
||||
$validator = Validator::make($request->all(), [
|
||||
'emails.*' => 'required|email',
|
||||
]);
|
||||
|
||||
// Return error
|
||||
if ($validator->fails()) {
|
||||
abort(400, 'Bad email input');
|
||||
}
|
||||
|
||||
// Send shared link via email
|
||||
if ($request->has('emails')) {
|
||||
foreach ($request->emails as $email) {
|
||||
Notification::route('mail', $email)
|
||||
->notify(new SharedSendViaEmail($token));
|
||||
}
|
||||
}
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\FileManager;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
|
||||
class TrashController extends Controller
|
||||
{
|
||||
/**
|
||||
* TrashController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore item from trash
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function restore(Request $request)
|
||||
{
|
||||
// Validate request
|
||||
// TODO: zrefaktorovat validator do requestu
|
||||
$validator = Validator::make($request->input('items'), [
|
||||
'*.type' => 'required|string',
|
||||
'*.id' => 'string',
|
||||
]);
|
||||
|
||||
// Return error
|
||||
if ($validator->fails()) {
|
||||
abort(400, 'Bad input');
|
||||
}
|
||||
|
||||
// Get user id
|
||||
$user_id = Auth::id();
|
||||
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
foreach ($request->input('items') as $restore) {
|
||||
// Get folder
|
||||
if ($restore['type'] === 'folder') {
|
||||
// Get folder
|
||||
$item = Folder::onlyTrashed()
|
||||
->where('user_id', $user_id)
|
||||
->where('id', $restore['id'])
|
||||
->first();
|
||||
|
||||
// Restore item to home directory
|
||||
if ($request->has('to_home') && $request->to_home) {
|
||||
$item->parent_id = null;
|
||||
$item->save();
|
||||
}
|
||||
} else {
|
||||
// Get item
|
||||
$item = File::onlyTrashed()
|
||||
->where('user_id', $user_id)
|
||||
->where('id', $restore['id'])
|
||||
->first();
|
||||
|
||||
// Restore item to home directory
|
||||
if ($request->has('to_home') && $request->to_home) {
|
||||
$item->folder_id = null;
|
||||
$item->save();
|
||||
}
|
||||
}
|
||||
|
||||
// Restore Item
|
||||
$item->restore();
|
||||
}
|
||||
|
||||
// Return response
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty user trash
|
||||
*
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function dump()
|
||||
{
|
||||
// Get user id
|
||||
$user_id = Auth::id();
|
||||
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
// Get files and folders
|
||||
$folders = Folder::onlyTrashed()->where('user_id', $user_id)->get();
|
||||
$files = File::onlyTrashed()->where('user_id', $user_id)->get();
|
||||
|
||||
// Force delete folder
|
||||
$folders->each->forceDelete();
|
||||
|
||||
// Force delete files
|
||||
foreach ($files as $file) {
|
||||
// Delete file
|
||||
Storage::delete("/files/$user_id/{$file->basename}");
|
||||
|
||||
// Delete thumbnail if exist
|
||||
if ($file->thumbnail) {
|
||||
Storage::delete("/files/$user_id/{$file->getRawOriginal('thumbnail')}");
|
||||
}
|
||||
|
||||
// Delete file permanently
|
||||
$file->forceDelete();
|
||||
}
|
||||
|
||||
// Return response
|
||||
return response('Done!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,248 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Sharing;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\HelperService;
|
||||
use Illuminate\Support\Collection;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\FileResource;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Http\Resources\ShareResource;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Http\Requests\Share\AuthenticateShareRequest;
|
||||
|
||||
class BrowseShareController extends Controller
|
||||
{
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->helper = resolve(HelperService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show page index and delete access_token & shared_token cookie
|
||||
* @param Share $shared
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
public function index(Share $shared)
|
||||
{
|
||||
// Delete share_session if exist
|
||||
if ($shared->is_protected) {
|
||||
cookie()->queue('share_session', '', -1);
|
||||
}
|
||||
|
||||
// Check if shared is image file and then show it
|
||||
if ($shared->type === 'file' && ! $shared->is_protected) {
|
||||
$image = File::whereUserId($shared->user_id)
|
||||
->whereType('image')
|
||||
->whereId($shared->item_id)
|
||||
->first();
|
||||
|
||||
if ($image) {
|
||||
// Store user download size
|
||||
$shared
|
||||
->user
|
||||
->record_download(
|
||||
(int) $image->getRawOriginal('filesize')
|
||||
);
|
||||
|
||||
return $this->get_single_image($image, $shared->user_id);
|
||||
}
|
||||
}
|
||||
|
||||
return view('index')
|
||||
->with('installation', 'setup-done')
|
||||
->with('settings', get_settings_in_json() ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Password for protected item
|
||||
*
|
||||
* @param AuthenticateShareRequest $request
|
||||
* @param Share $shared
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function authenticate(AuthenticateShareRequest $request, Share $shared)
|
||||
{
|
||||
// Check password
|
||||
if (Hash::check($request->password, $shared->password)) {
|
||||
$cookie = json_encode([
|
||||
'token' => $shared->token,
|
||||
'authenticated' => true,
|
||||
]);
|
||||
|
||||
// Return authorize token with shared options
|
||||
return response(new ShareResource($shared), 200)
|
||||
->cookie('share_session', $cookie, 43200);
|
||||
}
|
||||
|
||||
abort(401, __t('incorrect_password'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse shared folder
|
||||
*
|
||||
* @param $id
|
||||
* @param Share $shared
|
||||
* @return Collection
|
||||
*/
|
||||
public function browse_folder($id, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check if user can get directory
|
||||
$this->helper->check_item_access($id, $shared);
|
||||
|
||||
// Get files and folders
|
||||
list($folders, $files) = $this->helper->get_items_under_shared_by_folder_id($id, $shared);
|
||||
|
||||
// Set thumbnail links for public files
|
||||
$files->map(function ($file) use ($shared) {
|
||||
$file->setPublicUrl($shared->token);
|
||||
});
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search shared files
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Share $shared
|
||||
* @return Collection
|
||||
*/
|
||||
public function search(Request $request, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
$query = remove_accents(
|
||||
$request->input('query')
|
||||
);
|
||||
|
||||
// Search files id db
|
||||
$searched_files = File::search($query)
|
||||
->where('user_id', $shared->user_id)
|
||||
->get();
|
||||
$searched_folders = Folder::search($query)
|
||||
->where('user_id', $shared->user_id)
|
||||
->get();
|
||||
|
||||
// Get all children content
|
||||
$foldersIds = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('user_id', $shared->user_id)
|
||||
->where('parent_id', $shared->item_id)
|
||||
->get();
|
||||
|
||||
// Get accessible folders
|
||||
$accessible_folder_ids = Arr::flatten([filter_folders_ids($foldersIds), $shared->item_id]);
|
||||
|
||||
// Filter files
|
||||
$files = $searched_files->filter(function ($file) use ($accessible_folder_ids, $shared) {
|
||||
// Set public urls
|
||||
$file->setPublicUrl($shared->token);
|
||||
|
||||
// check if item is in accessible folders
|
||||
return in_array($file->folder_id, $accessible_folder_ids);
|
||||
});
|
||||
|
||||
// Filter folders
|
||||
$folders = $searched_folders->filter(function ($folder) use ($accessible_folder_ids) {
|
||||
// check if item is in accessible folders
|
||||
return in_array($folder->id, $accessible_folder_ids);
|
||||
});
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get navigation tree of shared folder
|
||||
*
|
||||
* @param Share $shared
|
||||
* @return array
|
||||
*/
|
||||
public function navigation_tree(Share $shared)
|
||||
{
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check if user can get directory
|
||||
$this->helper->check_item_access($shared->item_id, $shared);
|
||||
|
||||
// Get folders
|
||||
$folders = Folder::with('folders:id,parent_id,name')
|
||||
->whereParentId($shared->item_id)
|
||||
->whereUserId($shared->user_id)
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'id', 'name']);
|
||||
|
||||
return [
|
||||
[
|
||||
'id' => $shared->item_id,
|
||||
'name' => __t('home'),
|
||||
'location' => 'public',
|
||||
'folders' => $folders,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shared file record
|
||||
*
|
||||
* @param Share $shared
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_single_file(Share $shared)
|
||||
{
|
||||
// Check ability to access protected share files
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Get file
|
||||
$file = File::whereUserId($shared->user_id)
|
||||
->whereId($shared->item_id)
|
||||
->firstOrFail();
|
||||
|
||||
// Set access urls
|
||||
$file->setPublicUrl($shared->token);
|
||||
|
||||
return response(new FileResource($file), 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image from storage and show it
|
||||
*
|
||||
* @param $file
|
||||
* @param $user_id
|
||||
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
private function get_single_image($file, $user_id)
|
||||
{
|
||||
// Format pretty filename
|
||||
$file_pretty_name = $file->name . '.' . $file->mimetype;
|
||||
|
||||
// Get file path
|
||||
$path = "/files/$user_id/$file->basename";
|
||||
|
||||
// Check if file exist
|
||||
if (! Storage::exists($path)) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return Storage::response($path, $file_pretty_name, [
|
||||
'Content-Type' => Storage::mimeType($path),
|
||||
'Content-Length' => Storage::size($path),
|
||||
'Accept-Ranges' => 'bytes',
|
||||
'Content-Range' => 'bytes 0-600/' . Storage::size($path),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Sharing;
|
||||
|
||||
use App\Models\Zip;
|
||||
use App\Models\Share;
|
||||
use App\Services\HelperService;
|
||||
use App\Models\File as UserFile;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class FileSharedAccessController extends Controller
|
||||
{
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->helper = resolve(HelperService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated zip for guest
|
||||
*
|
||||
* @param $id
|
||||
* @param $token
|
||||
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
public function get_zip_public($id, $token)
|
||||
{
|
||||
$disk = Storage::disk('local');
|
||||
|
||||
$zip = Zip::where('id', $id)
|
||||
->where('shared_token', $token)
|
||||
->first();
|
||||
|
||||
$zip
|
||||
->user
|
||||
->record_download(
|
||||
$disk->size("zip/$zip->basename")
|
||||
);
|
||||
|
||||
return $disk
|
||||
->download("zip/$zip->basename", $zip->basename, [
|
||||
'Content-Type' => 'application/zip',
|
||||
'Content-Length' => $disk->size("zip/$zip->basename"),
|
||||
'Accept-Ranges' => 'bytes',
|
||||
'Content-Range' => 'bytes 0-600/' . $disk->size("zip/$zip->basename"),
|
||||
'Content-Disposition' => 'attachment; filename=' . $zip->basename,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file public
|
||||
*
|
||||
* @param $filename
|
||||
* @param Share $shared
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_file_public($filename, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share files
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Get file record
|
||||
$file = UserFile::where('user_id', $shared->user_id)
|
||||
->where('basename', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
// Check file access
|
||||
$this->helper->check_guest_access_to_shared_items($shared, $file);
|
||||
|
||||
// Store user download size
|
||||
$shared
|
||||
->user
|
||||
->record_download(
|
||||
(int) $file->getRawOriginal('filesize')
|
||||
);
|
||||
|
||||
return $this->helper->download_file($file, $shared->user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get public image thumbnail
|
||||
*
|
||||
* @param $filename
|
||||
* @param Share $shared
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_thumbnail_public($filename, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share files
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Get file record
|
||||
$file = UserFile::where('user_id', $shared->user_id)
|
||||
->where('thumbnail', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
// Check file access
|
||||
$this->helper->check_guest_access_to_shared_items($shared, $file);
|
||||
|
||||
// Store user download size
|
||||
$shared
|
||||
->user
|
||||
->record_download(
|
||||
(int) $file->getRawOriginal('filesize')
|
||||
);
|
||||
|
||||
return $this->helper->download_thumbnail_file($file, $shared->user_id);
|
||||
}
|
||||
}
|
||||
@@ -1,300 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Sharing;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Services\HelperService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\FileManagerService;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\FileFunctions\UploadRequest;
|
||||
use App\Http\Requests\FileFunctions\MoveItemRequest;
|
||||
use App\Http\Requests\FileFunctions\DeleteItemRequest;
|
||||
use App\Http\Requests\FileFunctions\RenameItemRequest;
|
||||
use App\Http\Requests\FileFunctions\CreateFolderRequest;
|
||||
|
||||
class ManipulateShareItemsController extends Controller
|
||||
{
|
||||
private $filemanager;
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->filemanager = resolve(FileManagerService::class);
|
||||
$this->helper = resolve(HelperService::class);
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new folder for guest user with edit permission
|
||||
*
|
||||
* @param CreateFolderRequest $request
|
||||
* @param Share $shared
|
||||
* @return array|\Illuminate\Contracts\Foundation\Application|ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function create_folder(CreateFolderRequest $request, Share $shared)
|
||||
{
|
||||
if (is_demo_account($shared->user->email)) {
|
||||
return $this->demo->create_folder($request);
|
||||
}
|
||||
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check shared permission
|
||||
if (is_visitor($shared)) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
// Check access to requested directory
|
||||
$this->helper->check_item_access($request->parent_id, $shared);
|
||||
|
||||
// Create folder
|
||||
$folder = $this->filemanager->create_folder($request, $shared);
|
||||
|
||||
return response($folder, 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename item for guest user with edit permission
|
||||
*
|
||||
* @param RenameItemRequest $request
|
||||
* @param $id
|
||||
* @param Share $shared
|
||||
* @return mixed
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function rename_item(RenameItemRequest $request, $id, Share $shared)
|
||||
{
|
||||
if (is_demo_account($shared->user->email)) {
|
||||
return $this->demo->rename_item($request, $id);
|
||||
}
|
||||
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check shared permission
|
||||
if (is_visitor($shared)) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
// Get file|folder item
|
||||
$item = get_item($request->type, $id);
|
||||
|
||||
// Check access to requested item
|
||||
if ($request->type === 'folder') {
|
||||
$this->helper->check_item_access($item->id, $shared);
|
||||
} else {
|
||||
$this->helper->check_item_access($item->folder_id, $shared);
|
||||
}
|
||||
|
||||
// If request have a change folder icon values set the folder icon
|
||||
if ($request->type === 'folder' && $request->filled('icon')) {
|
||||
$this->filemanager->edit_folder_properties($request, $id);
|
||||
}
|
||||
|
||||
// Rename item
|
||||
$item = $this->filemanager->rename_item($request, $id, $shared);
|
||||
|
||||
// Set public url
|
||||
if ($item->type !== 'folder') {
|
||||
$item->setPublicUrl($shared->token);
|
||||
}
|
||||
|
||||
return response($item, 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete item for guest user with edit permission
|
||||
*
|
||||
* @param DeleteItemRequest $request
|
||||
* @param Share $shared
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function delete_item(DeleteItemRequest $request, Share $shared)
|
||||
{
|
||||
abort_if(is_demo_account($shared->user->email), 204, 'Done.');
|
||||
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check shared permission
|
||||
if (is_visitor($shared)) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
foreach ($request->items as $file) {
|
||||
// Get file|folder item
|
||||
$item = get_item($file['type'], $file['id']);
|
||||
|
||||
// Check access to requested item
|
||||
if ($file['type'] === 'folder') {
|
||||
$this->helper->check_item_access($item->id, $shared);
|
||||
} else {
|
||||
$this->helper->check_item_access($item->folder_id, $shared);
|
||||
}
|
||||
|
||||
// Delete item
|
||||
$this->filemanager->delete_item($file, $file['id'], $shared);
|
||||
}
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file for guest user with edit permission
|
||||
*
|
||||
* @param UploadRequest $request
|
||||
* @param Share $shared
|
||||
* @return File|\Illuminate\Contracts\Foundation\Application|ResponseFactory|Model|\Illuminate\Http\Response
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function upload(UploadRequest $request, Share $shared)
|
||||
{
|
||||
if (is_demo_account($shared->user->email)) {
|
||||
return $this->demo->upload($request);
|
||||
}
|
||||
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check shared permission
|
||||
if (is_visitor($shared)) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
// Check access to requested directory
|
||||
$this->helper->check_item_access($request->folder_id, $shared);
|
||||
|
||||
// Return new uploaded file
|
||||
$new_file = $this->filemanager->upload($request, $shared);
|
||||
|
||||
// Set public access url
|
||||
$new_file->setPublicUrl($shared->token);
|
||||
|
||||
return response($new_file, 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move item for guest user with edit permission
|
||||
*
|
||||
* @param MoveItemRequest $request
|
||||
* @param Share $shared
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function move(MoveItemRequest $request, Share $shared)
|
||||
{
|
||||
abort_if(is_demo_account($shared->user->email), 204, 'Done.');
|
||||
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check shared permission
|
||||
if (is_visitor($shared)) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
foreach ($request->items as $item) {
|
||||
if ($item['type'] === 'folder') {
|
||||
$this->helper->check_item_access([
|
||||
$request->to_id, $item['id'],
|
||||
], $shared);
|
||||
}
|
||||
|
||||
if ($item['type'] !== 'folder') {
|
||||
$file = File::where('id', $item['id'])
|
||||
->where('user_id', $shared->user_id)
|
||||
->firstOrFail();
|
||||
|
||||
$this->helper->check_item_access([
|
||||
$request->to_id, $file->folder_id,
|
||||
], $shared);
|
||||
}
|
||||
}
|
||||
|
||||
$this->filemanager->move($request, $request->to_id);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Guest download folder via zip
|
||||
*
|
||||
* @param $id
|
||||
* @param Share $shared
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_folder($id, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
// Check access to requested folder
|
||||
$this->helper->check_item_access($id, $shared);
|
||||
|
||||
// Get folder
|
||||
$folder = Folder::whereUserId($shared->user_id)
|
||||
->where('id', $id);
|
||||
|
||||
if (! $folder->exists()) {
|
||||
abort(404, 'Requested folder doesn\'t exists.');
|
||||
}
|
||||
|
||||
$zip = $this->filemanager->zip_folder($id, $shared);
|
||||
|
||||
// Get file
|
||||
return response([
|
||||
'url' => route('zip_public', [
|
||||
'id' => $zip->id,
|
||||
'token' => $shared->token,
|
||||
]),
|
||||
'name' => $zip->basename,
|
||||
], 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Guest download multiple files via zip
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Share $shared
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_multiple_files(Request $request, Share $shared)
|
||||
{
|
||||
// Check ability to access protected share record
|
||||
$this->helper->check_protected_share_record($shared);
|
||||
|
||||
$file_parent_folders = File::whereUserId($shared->user_id)
|
||||
->whereIn('id', $request->items)
|
||||
->get()
|
||||
->pluck('folder_id')
|
||||
->toArray();
|
||||
|
||||
// Check access to requested directory
|
||||
$this->helper->check_item_access($file_parent_folders, $shared);
|
||||
|
||||
// Get requested files
|
||||
$files = File::whereUserId($shared->user_id)
|
||||
->whereIn('id', $request->items)
|
||||
->get();
|
||||
|
||||
$zip = $this->filemanager->zip_files($files, $shared);
|
||||
|
||||
// Get file
|
||||
return response([
|
||||
'url' => route('zip_public', [
|
||||
'id' => $zip->id,
|
||||
'token' => $shared->token,
|
||||
]),
|
||||
'name' => $zip->basename,
|
||||
], 201);
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\Subscription;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\StripeService;
|
||||
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;
|
||||
|
||||
class StripeWebhookController extends CashierController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->stripe = resolve(StripeService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a cancelled customer from a Stripe subscription.
|
||||
*
|
||||
* @param array $payload
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function handleCustomerSubscriptionDeleted($payload)
|
||||
{
|
||||
if ($user = $this->getUserByStripeId($payload['data']['object']['customer'])) {
|
||||
$user->subscriptions->filter(function ($subscription) use ($payload) {
|
||||
return $subscription->stripe_id === $payload['data']['object']['id'];
|
||||
})->each(function ($subscription) {
|
||||
$subscription->markAsCancelled();
|
||||
});
|
||||
}
|
||||
|
||||
// Get user
|
||||
$user = User::whereStripeId($payload['data']['object']['customer'])
|
||||
->firstOrFail();
|
||||
|
||||
// Update storage capacity
|
||||
$user
|
||||
->settings()
|
||||
->update([
|
||||
'storage_capacity' => get_setting('storage_default'),
|
||||
]);
|
||||
|
||||
return $this->successMethod();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Invoice Payment Succeeded
|
||||
*
|
||||
* @param $payload
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function handleInvoicePaymentSucceeded($payload)
|
||||
{
|
||||
// Get user
|
||||
$user = User::whereStripeId($payload['data']['object']['customer'])
|
||||
->firstOrFail();
|
||||
|
||||
// Get requested plan
|
||||
$plan = $this->stripe->getPlan($user->subscription('main')->stripe_plan);
|
||||
|
||||
// Update user storage limit
|
||||
$user
|
||||
->settings()
|
||||
->update([
|
||||
'storage_capacity' => $plan['product']['metadata']['capacity'],
|
||||
]);
|
||||
|
||||
return $this->successMethod();
|
||||
}
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\UserResource;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Resources\InvoiceCollection;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Http\Resources\UserStorageResource;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\User\UpdateUserPasswordRequest;
|
||||
|
||||
class AccountController extends Controller
|
||||
{
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all user data to frontend
|
||||
*
|
||||
* @return UserResource
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return new UserResource(
|
||||
Auth::user()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get storage details
|
||||
*
|
||||
* @return UserStorageResource
|
||||
*/
|
||||
public function storage()
|
||||
{
|
||||
return new UserStorageResource(
|
||||
Auth::user()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user invoices
|
||||
*
|
||||
* @return InvoiceCollection
|
||||
*/
|
||||
public function invoices()
|
||||
{
|
||||
return new InvoiceCollection(
|
||||
Auth::user()->invoices()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update user settings relationship
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function update_user_settings(Request $request)
|
||||
{
|
||||
// Validate request
|
||||
// TODO: pridat validator do requestu
|
||||
$validator = Validator::make($request->all(), [
|
||||
'avatar' => 'sometimes|file',
|
||||
'name' => 'string',
|
||||
'value' => 'string',
|
||||
]);
|
||||
|
||||
// Return error
|
||||
if ($validator->fails()) {
|
||||
abort(400, 'Bad input');
|
||||
}
|
||||
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
// Update avatar
|
||||
if ($request->hasFile('avatar')) {
|
||||
$user
|
||||
->settings()
|
||||
->update([
|
||||
'avatar' => store_avatar($request, 'avatar'),
|
||||
]);
|
||||
|
||||
return response('Saved!', 204);
|
||||
}
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->update(
|
||||
make_single_input($request)
|
||||
);
|
||||
|
||||
return response('Saved!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change user password
|
||||
*
|
||||
* @param Request $request
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function change_password(UpdateUserPasswordRequest $request)
|
||||
{
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
// Change and store new password
|
||||
$user->password = bcrypt($request->input('password'));
|
||||
$user->save();
|
||||
|
||||
return response('Changed!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\DemoService;
|
||||
use App\Services\StripeService;
|
||||
use Laravel\Cashier\PaymentMethod;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Http\Resources\PaymentCardResource;
|
||||
use App\Http\Resources\PaymentCardCollection;
|
||||
use App\Http\Resources\PaymentDefaultCardResource;
|
||||
use App\Http\Requests\Payments\RegisterNewPaymentMethodRequest;
|
||||
|
||||
class PaymentMethodsController extends Controller
|
||||
{
|
||||
private StripeService $stripe;
|
||||
|
||||
private DemoService $demo;
|
||||
|
||||
public function __construct(StripeService $stripe)
|
||||
{
|
||||
$this->stripe = $stripe;
|
||||
$this->demo = resolve(DemoService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user payment methods grouped by default and others
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
if (! $user->hasPaymentMethod()) {
|
||||
return abort(204, 'User don\'t have any payment methods');
|
||||
}
|
||||
|
||||
$slug_payment_methods = 'payment-methods-user-' . $user->id;
|
||||
$slug_default_payment_method = 'default-payment-methods-user-' . $user->id;
|
||||
|
||||
if (Cache::has($slug_payment_methods) && Cache::has($slug_default_payment_method)) {
|
||||
$defaultPaymentMethod = Cache::get($slug_default_payment_method);
|
||||
$paymentMethodsMapped = Cache::get($slug_payment_methods);
|
||||
} else {
|
||||
// Get default payment method
|
||||
$defaultPaymentMethod = Cache::rememberForever($slug_default_payment_method, function () use ($user) {
|
||||
$defaultPaymentMethodObject = $user->defaultPaymentMethod();
|
||||
|
||||
return $defaultPaymentMethodObject instanceof PaymentMethod
|
||||
? $defaultPaymentMethodObject->asStripePaymentMethod()
|
||||
: $defaultPaymentMethodObject;
|
||||
});
|
||||
|
||||
// filter payment methods without default payment
|
||||
$paymentMethodsMapped = Cache::rememberForever($slug_payment_methods, function () use ($defaultPaymentMethod, $user) {
|
||||
$paymentMethods = $user->paymentMethods()->filter(function ($paymentMethod) use ($defaultPaymentMethod) {
|
||||
return $paymentMethod->id !== $defaultPaymentMethod->id;
|
||||
});
|
||||
|
||||
// Get payment methods
|
||||
return $paymentMethods->map(function ($paymentMethod) {
|
||||
return $paymentMethod->asStripePaymentMethod();
|
||||
})->values()->all();
|
||||
});
|
||||
}
|
||||
|
||||
if (! $user->card_brand || ! $user->stripe_id || is_null($paymentMethodsMapped) && is_null($paymentMethodsMapped)) {
|
||||
return [
|
||||
'default' => null,
|
||||
'others' => [],
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'default' => $defaultPaymentMethod instanceof PaymentMethod
|
||||
? new PaymentCardResource($defaultPaymentMethod)
|
||||
: new PaymentDefaultCardResource($defaultPaymentMethod),
|
||||
'others' => new PaymentCardCollection($paymentMethodsMapped),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Update default payment method
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $id
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function update($id)
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
// Update DefaultPayment Method
|
||||
$user->updateDefaultPaymentMethod($id);
|
||||
|
||||
// Sync default payment method
|
||||
$user->updateDefaultPaymentMethodFromStripe();
|
||||
|
||||
// Clear cached payment methods
|
||||
cache_forget_many([
|
||||
'payment-methods-user-' . $user->id,
|
||||
'default-payment-methods-user-' . $user->id,
|
||||
]);
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new payment method for user
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function store(RegisterNewPaymentMethodRequest $request)
|
||||
{
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
if (is_demo($user->id)) {
|
||||
return response('Done', 201);
|
||||
}
|
||||
|
||||
// Register new payment method
|
||||
$this->stripe->registerNewPaymentMethod($request, $user);
|
||||
|
||||
return response('Done', 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user payment method
|
||||
*
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
abort_if(is_demo_account('howdy@hi5ve.digital'), 204, 'Done.');
|
||||
|
||||
// Get payment method
|
||||
$paymentMethod = $user->findPaymentMethod($id);
|
||||
|
||||
// Delete payment method
|
||||
$paymentMethod->delete();
|
||||
|
||||
// Sync default payment method
|
||||
$user->updateDefaultPaymentMethodFromStripe();
|
||||
|
||||
// Clear cached payment methods
|
||||
cache_forget_many([
|
||||
'payment-methods-user-' . $user->id,
|
||||
'default-payment-methods-user-' . $user->id,
|
||||
]);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use Auth;
|
||||
use App\Models\User;
|
||||
use Stripe\SetupIntent;
|
||||
use App\Services\DemoService;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\StripeService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Http\Resources\UserSubscription;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\Subscription\StoreUpgradeAccountRequest;
|
||||
|
||||
class SubscriptionController extends Controller
|
||||
{
|
||||
private $stripe;
|
||||
private $demo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->stripe = resolve(StripeService::class);
|
||||
$this->demo = DemoService::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate setup intent
|
||||
*
|
||||
* @return Application|ResponseFactory|Response|SetupIntent
|
||||
*/
|
||||
public function setup_intent()
|
||||
{
|
||||
return response(
|
||||
$this->stripe->getSetupIntent(Auth::user()),
|
||||
201
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user subscription detail
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
$user = User::find(Auth::id());
|
||||
|
||||
if (! $user->subscription('main')) {
|
||||
return abort(204, 'User don\'t have any subscription');
|
||||
}
|
||||
|
||||
$slug = 'subscription-user-' . $user->id;
|
||||
|
||||
if (Cache::has($slug)) {
|
||||
return Cache::get($slug);
|
||||
}
|
||||
|
||||
return Cache::rememberForever($slug, function () use ($user) {
|
||||
return new UserSubscription(
|
||||
$user
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade account to subscription
|
||||
*
|
||||
* @param StoreUpgradeAccountRequest $request
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function upgrade(StoreUpgradeAccountRequest $request)
|
||||
{
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if is demo
|
||||
if (is_demo($user->id)) {
|
||||
return $this->demo->response_204();
|
||||
}
|
||||
|
||||
// Forget user subscription
|
||||
Cache::forget('subscription-user-' . $user->id);
|
||||
|
||||
// Get requested plan
|
||||
$plan = $this->stripe->getPlan($request->input('plan.data.id'));
|
||||
|
||||
// Set user billing
|
||||
$user->setBilling($request->input('billing'));
|
||||
|
||||
// Update stripe customer billing info
|
||||
$this->stripe->updateCustomerDetails($user);
|
||||
|
||||
// Make subscription
|
||||
$this->stripe->createOrReplaceSubscription($request, $user);
|
||||
|
||||
// Update user storage limit
|
||||
$user->settings()->update([
|
||||
'storage_capacity' => $plan['product']['metadata']['capacity'],
|
||||
]);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel Subscription
|
||||
*
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function cancel()
|
||||
{
|
||||
$user = User::find(Auth::id());
|
||||
|
||||
// Check if is demo
|
||||
if (is_demo($user->id)) {
|
||||
return $this->demo->response_204();
|
||||
}
|
||||
|
||||
// Cancel subscription
|
||||
$user->subscription('main')->cancel();
|
||||
|
||||
// Forget user subscription
|
||||
Cache::forget('subscription-user-' . $user->id);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume Subscription
|
||||
*
|
||||
* @return ResponseFactory|Response
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$user = User::find(Auth::id());
|
||||
|
||||
// Check if is demo
|
||||
if (is_demo($user->id)) {
|
||||
return $this->demo->response_204();
|
||||
}
|
||||
|
||||
// Resume subscription
|
||||
$user->subscription('main')->resume();
|
||||
|
||||
// Forget user subscription
|
||||
Cache::forget('subscription-user-' . $user->id);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Fruitcake\Cors\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
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
EnsureFrontendRequestsAreStateful::class,
|
||||
//'throttle:api',
|
||||
//\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::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' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
];
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Notifications;
|
||||
|
||||
use Laravel\Cashier\Payment;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class ConfirmPayment extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* The PaymentIntent identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $paymentId;
|
||||
|
||||
/**
|
||||
* The payment amount.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
* Create a new payment confirmation notification.
|
||||
*
|
||||
* @param \Laravel\Cashier\Payment $payment
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Payment $payment)
|
||||
{
|
||||
$this->paymentId = $payment->id;
|
||||
$this->amount = $payment->amount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$url = route('cashier.payment', ['id' => $this->paymentId]);
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(__('cashier.confirm_payment'))
|
||||
->greeting(__('cashier.confirm_amount', ['amount' => $this->amount]))
|
||||
->line(__('cashier.confirm_description'))
|
||||
->action(__('cashier.confirm_button'), $url);
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\SetupWizard;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreAppSetupRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'title' => 'required|string',
|
||||
'description' => 'required|string',
|
||||
'logo' => 'sometimes|file',
|
||||
'logo_horizontal' => 'sometimes|file',
|
||||
'favicon' => 'sometimes|file',
|
||||
'contactMail' => 'required|email',
|
||||
'googleAnalytics' => 'sometimes|string',
|
||||
'defaultStorage' => 'sometimes|digits_between:1,9',
|
||||
'userRegistration' => 'required|boolean',
|
||||
'storageLimitation' => 'required|boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\SetupWizard;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreEnvironmentSetupRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'storage' => 'required|array',
|
||||
'storage.driver' => 'required|string',
|
||||
'storage.key' => 'sometimes|nullable|string',
|
||||
'storage.secret' => 'sometimes|nullable|string',
|
||||
'storage.endpoint' => 'sometimes|nullable|string',
|
||||
'storage.region' => 'sometimes|nullable|string',
|
||||
'storage.bucket' => 'sometimes|nullable|string',
|
||||
'mail' => 'required|array',
|
||||
'mail.driver' => 'required|string',
|
||||
'mail.host' => 'required|string',
|
||||
'mail.port' => 'required|string',
|
||||
'mail.username' => 'required|string',
|
||||
'mail.password' => 'required|string',
|
||||
'mail.encryption' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\SetupWizard;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreStripeBillingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'billing_phone_number' => 'sometimes|nullable|string',
|
||||
'billing_postal_code' => 'required|string',
|
||||
'billing_vat_number' => 'required|string',
|
||||
'billing_address' => 'required|string',
|
||||
'billing_country' => 'required|string',
|
||||
'billing_state' => 'required|string',
|
||||
'billing_city' => 'required|string',
|
||||
'billing_name' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\SetupWizard;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreStripeCredentialsRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'currency' => 'required|string',
|
||||
'webhookSecret' => 'required|string',
|
||||
'secret' => 'required|string',
|
||||
'key' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\SetupWizard;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreStripePlansRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'plans' => 'required|array',
|
||||
'plans.*.type' => 'required|string',
|
||||
'plans.*.attributes.name' => 'required|string',
|
||||
'plans.*.attributes.price' => 'required|string',
|
||||
'plans.*.attributes.description' => 'sometimes|nullable|string',
|
||||
'plans.*.attributes.capacity' => 'required|digits_between:1,9',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\Subscription;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreUpgradeAccountRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
// Billings
|
||||
'billing' => 'required|array',
|
||||
'billing.billing_address' => 'required|string',
|
||||
'billing.billing_city' => 'required|string',
|
||||
'billing.billing_country' => 'required|string',
|
||||
'billing.billing_name' => 'required|string',
|
||||
'billing.billing_phone_number' => 'required|string',
|
||||
'billing.billing_postal_code' => 'required|string',
|
||||
'billing.billing_state' => 'required|string',
|
||||
|
||||
// Payment
|
||||
'payment' => 'required|array',
|
||||
'payment.type' => 'required|string',
|
||||
'payment.meta' => 'required|sometimes|array',
|
||||
'payment.meta.pm' => 'required|sometimes|string',
|
||||
|
||||
// Plan
|
||||
'plan.data' => 'required|array',
|
||||
'plan.data.attributes' => 'required|array',
|
||||
'plan.data.attributes.capacity' => 'required|digits_between:1,9',
|
||||
'plan.data.attributes.capacity_formatted' => 'required|string',
|
||||
'plan.data.attributes.currency' => 'required|string',
|
||||
'plan.data.attributes.description' => 'sometimes|string|nullable',
|
||||
'plan.data.attributes.name' => 'required|string',
|
||||
'plan.data.attributes.price' => 'required|string',
|
||||
'plan.data.id' => 'required|string',
|
||||
'plan.data.type' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class FileResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'file',
|
||||
'attributes' => [
|
||||
'name' => $this->name,
|
||||
'basename' => $this->basename,
|
||||
'mimetype' => $this->mimetype,
|
||||
'filesize' => $this->filesize,
|
||||
'type' => $this->type,
|
||||
'file_url' => $this->file_url,
|
||||
'thumbnail' => $this->thumbnail,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->created_at,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class InvoiceAdminCollection extends ResourceCollection
|
||||
{
|
||||
public $collects = InvoiceAdminResource::class;
|
||||
|
||||
/**
|
||||
* Transform the resource collection into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => $this->collection,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\User;
|
||||
use Laravel\Cashier\Cashier;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class InvoiceAdminResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$user = User::where('stripe_id', $this['customer'])
|
||||
->first();
|
||||
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this['id'],
|
||||
'type' => 'invoices',
|
||||
'attributes' => [
|
||||
'customer' => $this['customer'],
|
||||
'total' => Cashier::formatAmount($this['total']),
|
||||
'currency' => $this['currency'],
|
||||
'created_at_formatted' => format_date($this['created']),
|
||||
'created_at' => $this['created'],
|
||||
'order' => $this['number'],
|
||||
'user_id' => $user->id ?? null,
|
||||
'client' => [
|
||||
'billing_address' => $this['customer_address'],
|
||||
'billing_name' => $this['customer_name'],
|
||||
'billing_phone_number' => $this['customer_phone'],
|
||||
],
|
||||
'bag' => [
|
||||
'amount' => $this['lines']['data'][0]['amount'],
|
||||
'currency' => $this['lines']['data'][0]['currency'],
|
||||
'type' => $this['lines']['data'][0]['type'],
|
||||
'description' => $this['lines']['data'][0]['description'],
|
||||
],
|
||||
'seller' => null,
|
||||
],
|
||||
$this->mergeWhen($user, function () use ($user) {
|
||||
return [
|
||||
'relationships' => [
|
||||
'user' => [
|
||||
'data' => [
|
||||
'id' => $user->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'name' => $user->settings->name,
|
||||
'avatar' => $user->settings->avatar,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class InvoiceCollection extends ResourceCollection
|
||||
{
|
||||
public $collects = InvoiceResource::class;
|
||||
|
||||
/**
|
||||
* Transform the resource collection into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => $this->collection,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class InvoiceResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$user = User::whereStripeId($this->customer)
|
||||
->first();
|
||||
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'invoices',
|
||||
'attributes' => [
|
||||
'customer' => $this->customer,
|
||||
'total' => $this->total(),
|
||||
'currency' => $this->currency,
|
||||
'created_at_formatted' => format_date($this->date(), '%d. %B. %Y'),
|
||||
'created_at' => $this->created,
|
||||
'order' => $this->number,
|
||||
'user_id' => $user->id ?? null,
|
||||
'client' => [
|
||||
'billing_address' => $this->customer_address,
|
||||
'billing_name' => $this->customer_name,
|
||||
'billing_phone_number' => $this->customer_phone,
|
||||
],
|
||||
'seller' => null,
|
||||
'invoice_items' => $this->get_invoice_items(),
|
||||
'invoice_subscriptions' => $this->get_invoice_subscriptions(),
|
||||
],
|
||||
$this->mergeWhen($user, [
|
||||
'relationships' => [
|
||||
'user' => [
|
||||
'data' => [
|
||||
'id' => $user->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'name' => $user->settings->name,
|
||||
'avatar' => $user->settings->avatar,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
private function get_invoice_subscriptions(): array
|
||||
{
|
||||
$array = [];
|
||||
|
||||
foreach ($this->subscriptions() as $item) {
|
||||
array_push($array, [
|
||||
'amount' => $item->total(),
|
||||
'description' => $item->description,
|
||||
'currency' => $item->currency,
|
||||
'type' => $item->type,
|
||||
]);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
private function get_invoice_items(): array
|
||||
{
|
||||
$array = [];
|
||||
|
||||
foreach ($this->invoiceItems() as $item) {
|
||||
array_push($array, [
|
||||
'amount' => $item->total(),
|
||||
'description' => $item->description,
|
||||
'currency' => $item->currency,
|
||||
'type' => $item->type,
|
||||
]);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PaymentCardResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => (string) $this['id'],
|
||||
'type' => 'payment_method',
|
||||
'attributes' => [
|
||||
'provider' => 'stripe',
|
||||
'card_id' => $this['id'],
|
||||
'brand' => strtolower($this['card']['brand']),
|
||||
'last4' => $this['card']['last4'],
|
||||
'exp_month' => $this['card']['exp_month'],
|
||||
'exp_year' => $this['card']['exp_year'],
|
||||
'created_at' => format_date($this['created_at'], '%d. %B. %Y'),
|
||||
'status' => 'active',
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PaymentDefaultCardResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => (string) $this['id'],
|
||||
'type' => 'payment_method',
|
||||
'attributes' => [
|
||||
'provider' => 'stripe',
|
||||
'card_id' => $this['id'],
|
||||
'brand' => isset($this['brand']) ? strtolower($this['brand']) : strtolower($this['card']['brand']),
|
||||
'last4' => isset($this['last4']) ? $this['last4'] : $this['card']['last4'],
|
||||
'exp_month' => isset($this['exp_month']) ? $this['exp_month'] : $this['card']['exp_month'],
|
||||
'exp_year' => isset($this['exp_year']) ? $this['exp_year'] : $this['card']['exp_year'],
|
||||
'created_at' => format_date($this['created_at'], '%d. %B. %Y'),
|
||||
'status' => 'active',
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Laravel\Cashier\Cashier;
|
||||
use Laravel\Cashier\Subscription;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PlanResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
// Get subscribers
|
||||
$subscriber_count = Subscription::where('stripe_plan', $this['plan']['id'])->where('stripe_status', 'active')->get();
|
||||
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this['plan']['id'],
|
||||
'type' => 'plans',
|
||||
'attributes' => [
|
||||
'subscribers' => $subscriber_count->count(),
|
||||
'status' => $this['plan']['active'] ? 1 : 0,
|
||||
'name' => $this['product']['name'],
|
||||
'description' => $this['product']['description'],
|
||||
'price' => $this['plan']['amount'],
|
||||
'price_formatted' => Cashier::formatAmount($this['plan']['amount']),
|
||||
'capacity_formatted' => format_gigabytes($this['product']['metadata']['capacity']),
|
||||
'capacity' => (int) $this['product']['metadata']['capacity'],
|
||||
'created_at_formatted' => format_date($this['plan']['created']),
|
||||
'created_at' => $this['plan']['created'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class PricingCollection extends ResourceCollection
|
||||
{
|
||||
public $collects = PricingResource::class;
|
||||
|
||||
/**
|
||||
* Transform the resource collection into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => $this->collection,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Laravel\Cashier\Cashier;
|
||||
use App\Services\StripeService;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PricingResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this['plan']['id'],
|
||||
'type' => 'plans',
|
||||
'attributes' => [
|
||||
'name' => $this['product']['name'],
|
||||
'description' => $this['product']['description'],
|
||||
'price' => Cashier::formatAmount($this['plan']['amount']),
|
||||
'capacity_formatted' => format_gigabytes($this['product']['metadata']['capacity']),
|
||||
'capacity' => (int) $this['product']['metadata']['capacity'],
|
||||
'currency' => config('cashier.currency'),
|
||||
'tax_rates' => resolve(StripeService::class)->get_tax_rates($this['plan']['amount']),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ShareResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => (string) $this->id,
|
||||
'type' => 'shares',
|
||||
'attributes' => [
|
||||
'permission' => $this->permission,
|
||||
'is_protected' => $this->is_protected,
|
||||
'item_id' => $this->item_id,
|
||||
'expire_in' => (int) $this->expire_in,
|
||||
'token' => $this->token,
|
||||
'link' => $this->link,
|
||||
'type' => $this->type,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
// TODO: zrefaktorovat
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'storage_capacity' => $this->settings->storage_capacity,
|
||||
'subscription' => $this->subscribed('main'),
|
||||
'incomplete_payment' => $this->hasIncompletePayment('main') ? route('cashier.payment', $this->subscription('main')->latestPayment()->id) : null,
|
||||
'stripe_customer' => is_null($this->stripe_id) ? false : true,
|
||||
'email' => is_demo() ? obfuscate_email($this->email) : $this->email,
|
||||
'role' => $this->role,
|
||||
'folders' => $this->folder_tree,
|
||||
'storage' => $this->storage,
|
||||
'created_at_formatted' => format_date($this->created_at, '%d. %B. %Y'),
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
],
|
||||
'relationships' => [
|
||||
'settings' => [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'settings',
|
||||
'attributes' => [
|
||||
'avatar' => $this->settings->avatar,
|
||||
'name' => $this->settings->name,
|
||||
'address' => $this->settings->address,
|
||||
'state' => $this->settings->state,
|
||||
'city' => $this->settings->city,
|
||||
'postal_code' => $this->settings->postal_code,
|
||||
'country' => $this->settings->country,
|
||||
'phone_number' => $this->settings->phone_number,
|
||||
'timezone' => $this->settings->timezone,
|
||||
],
|
||||
],
|
||||
],
|
||||
'favourites' => [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'favourite_folders',
|
||||
'attributes' => [
|
||||
'folders' => $this->favouriteFolders->makeHidden(['pivot']),
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\File;
|
||||
use ByteUnits\Metric;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserStorageResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$document_mimetypes = [
|
||||
'pdf', 'numbers', 'xlsx', 'xls', 'txt', 'md', 'rtf', 'pptx', 'ppt', 'odt', 'ods', 'odp', 'epub', 'docx', 'doc', 'csv', 'pages',
|
||||
];
|
||||
|
||||
// Get all images
|
||||
$images = File::where('user_id', $this->id)
|
||||
->where('type', 'image')->get()->map(function ($item) {
|
||||
return (int) $item->getRawOriginal('filesize');
|
||||
})->sum();
|
||||
|
||||
// Get all audios
|
||||
$audios = File::where('user_id', $this->id)
|
||||
->where('type', 'audio')->get()->map(function ($item) {
|
||||
return (int) $item->getRawOriginal('filesize');
|
||||
})->sum();
|
||||
|
||||
// Get all videos
|
||||
$videos = File::where('user_id', $this->id)
|
||||
->where('type', 'video')->get()->map(function ($item) {
|
||||
return (int) $item->getRawOriginal('filesize');
|
||||
})->sum();
|
||||
|
||||
// Get all documents
|
||||
$documents = File::where('user_id', $this->id)
|
||||
->whereIn('mimetype', $document_mimetypes)->get()->map(function ($item) {
|
||||
return (int) $item->getRawOriginal('filesize');
|
||||
})->sum();
|
||||
|
||||
// Get all other files
|
||||
$others = File::where('user_id', $this->id)
|
||||
->whereNotIn('mimetype', $document_mimetypes)
|
||||
->whereNotIn('type', ['audio', 'video', 'image'])
|
||||
->get()->map(function ($item) {
|
||||
return (int) $item->getRawOriginal('filesize');
|
||||
})->sum();
|
||||
|
||||
return [
|
||||
'data' => [
|
||||
'id' => (string) $this->id,
|
||||
'type' => 'storage',
|
||||
'attributes' => [
|
||||
'used' => Metric::bytes($this->used_capacity)->format(),
|
||||
'capacity' => format_gigabytes($this->settings->storage_capacity),
|
||||
'percentage' => (float) get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity),
|
||||
],
|
||||
'meta' => [
|
||||
'images' => [
|
||||
'used' => Metric::bytes($images)->format(),
|
||||
'percentage' => (float) get_storage_fill_percentage($images, $this->settings->storage_capacity),
|
||||
],
|
||||
'audios' => [
|
||||
'used' => Metric::bytes($audios)->format(),
|
||||
'percentage' => (float) get_storage_fill_percentage($audios, $this->settings->storage_capacity),
|
||||
],
|
||||
'videos' => [
|
||||
'used' => Metric::bytes($videos)->format(),
|
||||
'percentage' => (float) get_storage_fill_percentage($videos, $this->settings->storage_capacity),
|
||||
],
|
||||
'documents' => [
|
||||
'used' => Metric::bytes($documents)->format(),
|
||||
'percentage' => (float) get_storage_fill_percentage($documents, $this->settings->storage_capacity),
|
||||
],
|
||||
'others' => [
|
||||
'used' => Metric::bytes($others)->format(),
|
||||
'percentage' => (float) get_storage_fill_percentage($others, $this->settings->storage_capacity),
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserSubscription extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$active_subscription = $this->subscription('main')
|
||||
->asStripeSubscription();
|
||||
|
||||
// TODO: vybrat z cache
|
||||
$subscription = resolve('App\Services\StripeService')
|
||||
->getPlan($this->subscription('main')->stripe_plan);
|
||||
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $subscription['plan']['id'],
|
||||
'type' => 'subscription',
|
||||
'attributes' => [
|
||||
'incomplete' => $this->subscription('main')->incomplete(),
|
||||
'active' => $this->subscription('main')->active(),
|
||||
'canceled' => $this->subscription('main')->cancelled(),
|
||||
'name' => $subscription['product']['name'],
|
||||
'capacity' => (int) $subscription['product']['metadata']['capacity'],
|
||||
'capacity_formatted' => format_gigabytes($subscription['product']['metadata']['capacity']),
|
||||
'slug' => $subscription['plan']['id'],
|
||||
'canceled_at' => format_date($active_subscription['canceled_at'], '%d. %B. %Y'),
|
||||
'created_at' => format_date($active_subscription['current_period_start'], '%d. %B. %Y'),
|
||||
'ends_at' => format_date($active_subscription['current_period_end'], '%d. %B. %Y'),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use ByteUnits\Metric;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Scout\Searchable;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
|
||||
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @method static whereUserId($user_id)
|
||||
* @method static whereId($id)
|
||||
*/
|
||||
class File extends Model
|
||||
{
|
||||
use Searchable, SoftDeletes, Sortable, HasFactory;
|
||||
|
||||
public $public_access = null;
|
||||
|
||||
protected $guarded = [
|
||||
'id',
|
||||
];
|
||||
|
||||
protected $appends = [
|
||||
'file_url',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'metadata' => 'array',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'author_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Sortable columns
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $sortable = [
|
||||
'name',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
/**
|
||||
* Set routes with public access
|
||||
*
|
||||
* @param $token
|
||||
*/
|
||||
public function setPublicUrl($token)
|
||||
{
|
||||
$this->public_access = $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format created at date
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCreatedAtAttribute()
|
||||
{
|
||||
return format_date(set_time_by_user_timezone($this->attributes['created_at']), __t('time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Form\a\t created at date reformat
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDeletedAtAttribute()
|
||||
{
|
||||
if (! $this->attributes['deleted_at']) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return format_date(set_time_by_user_timezone($this->attributes['deleted_at']), __t('time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Format fileSize
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFilesizeAttribute()
|
||||
{
|
||||
return Metric::bytes($this->attributes['filesize'])->format();
|
||||
}
|
||||
|
||||
/**
|
||||
* Format thumbnail url
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getThumbnailAttribute()
|
||||
{
|
||||
// Get thumbnail from external storage
|
||||
if ($this->attributes['thumbnail'] && ! is_storage_driver(['local'])) {
|
||||
return Storage::temporaryUrl("files/$this->user_id/{$this->attributes['thumbnail']}", now()->addHour());
|
||||
}
|
||||
|
||||
// Get thumbnail from local storage
|
||||
if ($this->attributes['thumbnail']) {
|
||||
// Thumbnail route
|
||||
$route = route('thumbnail', ['name' => $this->attributes['thumbnail']]);
|
||||
|
||||
if ($this->public_access) {
|
||||
return "$route/$this->public_access";
|
||||
}
|
||||
|
||||
return $route;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format file url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileUrlAttribute()
|
||||
{
|
||||
// Get file from external storage
|
||||
if (! is_storage_driver(['local'])) {
|
||||
$file_pretty_name = is_storage_driver('backblaze')
|
||||
? Str::snake(mb_strtolower($this->attributes['name']))
|
||||
: get_pretty_name($this->attributes['basename'], $this->attributes['name'], $this->attributes['mimetype']);
|
||||
|
||||
$header = [
|
||||
'ResponseAcceptRanges' => 'bytes',
|
||||
'ResponseContentType' => $this->attributes['mimetype'],
|
||||
'ResponseContentLength' => $this->attributes['filesize'],
|
||||
'ResponseContentRange' => 'bytes 0-600/' . $this->attributes['filesize'],
|
||||
'ResponseContentDisposition' => 'attachment; filename=' . $file_pretty_name,
|
||||
];
|
||||
|
||||
return Storage::temporaryUrl("files/$this->user_id/{$this->attributes['basename']}", now()->addDay(), $header);
|
||||
}
|
||||
|
||||
// Get thumbnail from local storage
|
||||
$route = route('file', ['name' => $this->attributes['basename']]);
|
||||
|
||||
if ($this->public_access) {
|
||||
return "$route/$this->public_access";
|
||||
}
|
||||
|
||||
return $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index file
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray()
|
||||
{
|
||||
$array = $this->toArray();
|
||||
$name = Str::slug($array['name'], ' ');
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $name,
|
||||
'nameNgrams' => utf8_encode((new TNTIndexer)->buildTrigrams(implode(', ', [$name]))),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo(Folder::class, 'folder_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function folder()
|
||||
{
|
||||
return $this->hasOne(Folder::class, 'id', 'folder_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function shared()
|
||||
{
|
||||
return $this->hasOne(Share::class, 'item_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Model events
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($file) {
|
||||
$file->id = (string) Str::uuid();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Scout\Searchable;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
|
||||
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @method static whereUserId(int|string|null $id)
|
||||
*/
|
||||
class Folder extends Model
|
||||
{
|
||||
use Searchable, SoftDeletes, Sortable, HasFactory;
|
||||
|
||||
protected $guarded = [
|
||||
'id',
|
||||
];
|
||||
|
||||
protected $appends = [
|
||||
'items',
|
||||
'trashed_items',
|
||||
'type',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'emoji' => 'array',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'author_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Sortable columns
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $sortable = [
|
||||
'name',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
public function getTypeAttribute()
|
||||
{
|
||||
return 'folder';
|
||||
}
|
||||
|
||||
/**
|
||||
* Index folder
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray()
|
||||
{
|
||||
$array = $this->toArray();
|
||||
$name = Str::slug($array['name'], ' ');
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $name,
|
||||
'nameNgrams' => utf8_encode((new TNTIndexer)->buildTrigrams(implode(', ', [$name]))),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts how many folder have items
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getItemsAttribute()
|
||||
{
|
||||
$folders = $this->folders()->count();
|
||||
$files = $this->files()->count();
|
||||
|
||||
return $folders + $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts how many folder have items
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTrashedItemsAttribute()
|
||||
{
|
||||
$folders = $this->trashed_folders()->count();
|
||||
$files = $this->trashed_files()->count();
|
||||
|
||||
return $folders + $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format created at date reformat
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCreatedAtAttribute()
|
||||
{
|
||||
return format_date(set_time_by_user_timezone($this->attributes['created_at']), __t('time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Format created at date reformat
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDeletedAtAttribute()
|
||||
{
|
||||
if (! $this->attributes['deleted_at']) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return format_date(set_time_by_user_timezone($this->attributes['deleted_at']), __t('time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parent
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo(Folder::class, 'parent_id', 'id');
|
||||
}
|
||||
|
||||
public function folderIds()
|
||||
{
|
||||
return $this->children()->with('folderIds')->select(['id', 'parent_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all files
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function files()
|
||||
{
|
||||
return $this->hasMany(File::class, 'folder_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all trashed files
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function trashed_files()
|
||||
{
|
||||
return $this->hasMany(File::class, 'folder_id', 'id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all folders
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function folders()
|
||||
{
|
||||
return $this->children()->with('folders');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all trashed folders
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function trashed_folders()
|
||||
{
|
||||
return $this->children()->with('trashed_folders')->withTrashed()->select(['parent_id', 'id', 'name']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get childrens
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(Folder::class, 'parent_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get trashed childrens
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function trashed_children()
|
||||
{
|
||||
return $this->hasMany(Folder::class, 'parent_id', 'id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sharing attributes
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function shared()
|
||||
{
|
||||
return $this->hasOne(Share::class, 'item_id', 'id');
|
||||
}
|
||||
|
||||
// Delete all folder children
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($model) {
|
||||
$model->id = (string) Str::uuid();
|
||||
});
|
||||
|
||||
static::deleting(function ($item) {
|
||||
if ($item->isForceDeleting()) {
|
||||
$item->trashed_children()->each(function ($folder) {
|
||||
$folder->forceDelete();
|
||||
});
|
||||
} else {
|
||||
$item->children()->each(function ($folder) {
|
||||
$folder->delete();
|
||||
});
|
||||
|
||||
$item->files()->each(function ($file) {
|
||||
$file->delete();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
static::restoring(function ($item) {
|
||||
// Restore children folders
|
||||
$item->trashed_children()->each(function ($folder) {
|
||||
$folder->restore();
|
||||
});
|
||||
|
||||
// Restore children files
|
||||
$item->trashed_files()->each(function ($files) {
|
||||
$files->restore();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Invoice extends Model
|
||||
{
|
||||
protected $guarded = [
|
||||
'id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'seller' => 'array',
|
||||
'client' => 'array',
|
||||
'bag' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->hasOne(User::class, 'id', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @method static whereName(string $string)
|
||||
*/
|
||||
class Setting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'value', 'name',
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $primaryKey = 'name';
|
||||
|
||||
protected $keyType = 'string';
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Traffic extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'upload',
|
||||
'download',
|
||||
];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
/**
|
||||
* Model events
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($model) {
|
||||
$model->id = (string) Str::uuid();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,271 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use ByteUnits\Metric;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Cashier\Billable;
|
||||
use App\Services\HelperService;
|
||||
use App\Services\StripeService;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
use App\Notifications\ResetPassword;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable, Billable, Sortable, HasFactory, HasApiTokens;
|
||||
|
||||
protected $guarded = [
|
||||
'id',
|
||||
'role',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'email', 'password',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $appends = [
|
||||
'used_capacity',
|
||||
'storage',
|
||||
];
|
||||
|
||||
public $sortable = [
|
||||
'id',
|
||||
'name',
|
||||
'role',
|
||||
'created_at',
|
||||
'storage_capacity',
|
||||
];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
/**
|
||||
* Get tax rate id for user
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function taxRates()
|
||||
{
|
||||
// Get tax rates
|
||||
$rates = collect(resolve(StripeService::class)->getTaxRates());
|
||||
|
||||
// Find tax rate
|
||||
$user_tax_rate = $rates->first(function ($item) {
|
||||
return $item['country'] === $this->settings->country && $item['active'];
|
||||
});
|
||||
|
||||
return $user_tax_rate ? [$user_tax_rate['id']] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user used storage details
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getStorageAttribute()
|
||||
{
|
||||
// Get storage limitation setup
|
||||
$storage_limitation = get_setting('storage_limitation');
|
||||
$is_storage_limit = $storage_limitation ? $storage_limitation : 1;
|
||||
|
||||
// Get user storage usage
|
||||
if (! $is_storage_limit) {
|
||||
return [
|
||||
'used' => $this->used_capacity,
|
||||
'used_formatted' => Metric::bytes($this->used_capacity)->format(),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'used' => (float) get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity),
|
||||
'used_formatted' => get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity) . '%',
|
||||
'capacity' => $this->settings->storage_capacity,
|
||||
'capacity_formatted' => format_gigabytes($this->settings->storage_capacity),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user used storage capacity in bytes
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getUsedCapacityAttribute()
|
||||
{
|
||||
$user_capacity = $this->files_with_trashed->map(function ($item) {
|
||||
return $item->getRawOriginal();
|
||||
})->sum('filesize');
|
||||
|
||||
return $user_capacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user full folder tree
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getFolderTreeAttribute()
|
||||
{
|
||||
return Folder::with(['folders.shared', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('parent_id', null)
|
||||
->where('user_id', $this->id)
|
||||
->sortable()
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set user billing info
|
||||
*
|
||||
* @param $billing
|
||||
* @return UserSettings
|
||||
*/
|
||||
public function setBilling($billing)
|
||||
{
|
||||
$this->settings()->update([
|
||||
'address' => $billing['billing_address'],
|
||||
'city' => $billing['billing_city'],
|
||||
'country' => $billing['billing_country'],
|
||||
'name' => $billing['billing_name'],
|
||||
'phone_number' => $billing['billing_phone_number'],
|
||||
'postal_code' => $billing['billing_postal_code'],
|
||||
'state' => $billing['billing_state'],
|
||||
]);
|
||||
|
||||
return $this->settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the password reset notification.
|
||||
*
|
||||
* @param string $token
|
||||
* @return void
|
||||
*/
|
||||
public function sendPasswordResetNotification($token)
|
||||
{
|
||||
$this->notify(new ResetPassword($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Record user upload filesize
|
||||
*
|
||||
* @param $file_size
|
||||
*/
|
||||
public function record_upload($file_size)
|
||||
{
|
||||
$now = now();
|
||||
|
||||
$record = Traffic::whereYear('created_at', '=', $now->year)
|
||||
->whereMonth('created_at', '=', $now->month)
|
||||
->firstOrCreate([
|
||||
'user_id' => $this->id,
|
||||
]);
|
||||
|
||||
$record->update([
|
||||
'upload' => $record->upload + $file_size,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Record user download filesize
|
||||
*
|
||||
* @param $file_size
|
||||
*/
|
||||
public function record_download($file_size)
|
||||
{
|
||||
$now = now();
|
||||
|
||||
$record = Traffic::whereYear('created_at', '=', $now->year)
|
||||
->whereMonth('created_at', '=', $now->month)
|
||||
->firstOrCreate([
|
||||
'user_id' => $this->id,
|
||||
]);
|
||||
|
||||
$record->update([
|
||||
'download' => $record->download + $file_size,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user favourites folder
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function favouriteFolders()
|
||||
{
|
||||
return $this->belongsToMany(Folder::class, 'favourite_folder', 'user_id', 'folder_id', 'id', 'id')
|
||||
->with('shared:token,id,item_id,permission,is_protected,expire_in');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get 5 latest uploads
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany|\Illuminate\Database\Query\Builder
|
||||
*/
|
||||
public function latest_uploads()
|
||||
{
|
||||
return $this->hasMany(File::class)->with(['parent:id,name'])->take(40);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all user files
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function files()
|
||||
{
|
||||
return $this->hasMany(File::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all user files
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function files_with_trashed()
|
||||
{
|
||||
return $this->hasMany(File::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user attributes
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function settings()
|
||||
{
|
||||
return $this->hasOne(UserSettings::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Model Events
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($user) {
|
||||
$user->id = Str::uuid();
|
||||
|
||||
// Create user directory for his files
|
||||
Storage::makeDirectory("files/$user->id");
|
||||
});
|
||||
|
||||
static::deleted(function ($user) {
|
||||
resolve(HelperService::class)
|
||||
->erase_user_data($user);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class UserSettings extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $guarded = [
|
||||
'id',
|
||||
'storage_capacity',
|
||||
];
|
||||
|
||||
/**
|
||||
* Format avatar to full url
|
||||
*
|
||||
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
|
||||
*/
|
||||
public function getAvatarAttribute()
|
||||
{
|
||||
// Get avatar from external storage
|
||||
if ($this->attributes['avatar'] && ! is_storage_driver('local')) {
|
||||
return Storage::temporaryUrl($this->attributes['avatar'], now()->addDay());
|
||||
}
|
||||
|
||||
// Get avatar from local storage
|
||||
if ($this->attributes['avatar']) {
|
||||
return url('/' . $this->attributes['avatar']);
|
||||
}
|
||||
|
||||
return url('/assets/images/default-avatar.png');
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class ResetPassword extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @param $token
|
||||
*/
|
||||
public function __construct($token)
|
||||
{
|
||||
$this->token = $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$reset_url = url('/create-new-password?token=' . $this->token);
|
||||
$app_name = get_setting('app_title') ?? 'VueFileManager';
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(__t('reset_password_subject') . $app_name)
|
||||
->greeting(__t('reset_password_greeting'))
|
||||
->line(__t('reset_password_line_1'))
|
||||
->action(__t('reset_password_action'), $reset_url)
|
||||
->line(__t('reset_password_line_2'))
|
||||
->salutation(__t('salutation') . ', ' . $app_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
try {
|
||||
$app_locale = get_setting('language') ?? 'en';
|
||||
} catch (\PDOException $exception) {
|
||||
$app_locale = 'en';
|
||||
}
|
||||
|
||||
// Set locale for application
|
||||
app()->setLocale($app_locale);
|
||||
|
||||
// Set locale for carbon dates
|
||||
setlocale(LC_TIME, $app_locale . '_' . mb_strtoupper($app_locale));
|
||||
|
||||
// Get all migrations with all directories
|
||||
$this->loadMigrationsFrom(
|
||||
$this->get_migration_paths()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
private function get_migration_paths(): array
|
||||
{
|
||||
$mainPath = database_path('migrations');
|
||||
$directories = glob($mainPath . '/*', GLOB_ONLYDIR);
|
||||
|
||||
return array_merge([$mainPath], $directories);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
//use Laravel\Passport\Passport;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
// Define admin maintenance gate
|
||||
Gate::define('maintenance', function ($user) {
|
||||
return $user->role === 'admin';
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* This namespace is applied to your controller routes.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'App\Http\Controllers';
|
||||
|
||||
/**
|
||||
* The path to the "home" route for your application.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/home';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapShareRoutes();
|
||||
|
||||
$this->mapAdminApiRoutes();
|
||||
|
||||
$this->mapSetupWizardApiRoutes();
|
||||
|
||||
$this->mapUserApiRoutes();
|
||||
|
||||
$this->mapMaintenanceRoutes();
|
||||
|
||||
$this->mapFileRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
}
|
||||
|
||||
protected function mapMaintenanceRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/maintenance.php'));
|
||||
}
|
||||
|
||||
protected function mapFileRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/file.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
}
|
||||
|
||||
protected function mapShareRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/share.php'));
|
||||
}
|
||||
|
||||
protected function mapAdminApiRoutes()
|
||||
{
|
||||
Route::prefix('api/admin')
|
||||
->middleware(['api', 'auth:sanctum'])
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/admin.php'));
|
||||
}
|
||||
|
||||
protected function mapUserApiRoutes()
|
||||
{
|
||||
Route::prefix('api/user')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/user.php'));
|
||||
}
|
||||
|
||||
protected function mapSetupWizardApiRoutes()
|
||||
{
|
||||
Route::prefix('api/setup')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/setup.php'));
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\File;
|
||||
use ByteUnits\Metric;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Requests\FileFunctions\RenameItemRequest;
|
||||
|
||||
class DemoService
|
||||
{
|
||||
/**
|
||||
* Create new directory
|
||||
*
|
||||
* @param $request
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function create_folder($request)
|
||||
{
|
||||
return [
|
||||
'user_id' => 1,
|
||||
'id' => Str::uuid(),
|
||||
'parent_id' => random_int(1000, 9999),
|
||||
'name' => $request->name,
|
||||
'type' => 'folder',
|
||||
'author' => $request->user() ? 'user' : 'visitor',
|
||||
'items' => '0',
|
||||
'color' => isset($request->icon['color']) ? $request->icon['color'] : null,
|
||||
'emoji' => isset($request->icon['emoji']) ? $request->icon['emoji'] : null,
|
||||
'updated_at' => now()->format('j M Y \a\t H:i'),
|
||||
'created_at' => now()->format('j M Y \a\t H:i'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename item name
|
||||
*
|
||||
* @param RenameItemRequest $request
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function rename_item($request, $id)
|
||||
{
|
||||
// Get item
|
||||
if ($request->type === 'folder') {
|
||||
$item = Folder::where('id', $id)
|
||||
->where('user_id', 1)
|
||||
->first();
|
||||
} else {
|
||||
$item = File::where('id', $id)
|
||||
->where('user_id', 1)
|
||||
->first();
|
||||
}
|
||||
|
||||
if ($item) {
|
||||
$item->name = $request->name;
|
||||
$item->emoji = $request->icon['emoji'] ?? null;
|
||||
$item->color = $request->icon['color'] ?? null;
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $request->id,
|
||||
'name' => $request->name,
|
||||
'type' => $request->type,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload file
|
||||
*
|
||||
* @param $request
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function upload($request)
|
||||
{
|
||||
// File
|
||||
$file = $request->file('file');
|
||||
$filename = Str::random() . '-' . str_replace(' ', '', $file->getClientOriginalName());
|
||||
$thumbnail = null;
|
||||
$filesize = $file->getSize();
|
||||
$filetype = get_file_type($file->getMimeType());
|
||||
|
||||
return [
|
||||
'id' => Str::uuid(),
|
||||
'folder_id' => $request->parent_id,
|
||||
'thumbnail' => 'data:' . $request->file('file')->getMimeType() . ';base64, ' . base64_encode(file_get_contents($request->file('file'))),
|
||||
'name' => $file->getClientOriginalName(),
|
||||
'basename' => $filename,
|
||||
'mimetype' => $file->getClientOriginalExtension(),
|
||||
'filesize' => Metric::bytes($filesize)->format(),
|
||||
'type' => $filetype,
|
||||
'file_url' => 'https://vuefilemanager.hi5ve.digital/assets/vue-file-manager-preview.jpg',
|
||||
'author' => $request->user() ? 'user' : 'visitor',
|
||||
'created_at' => now()->format('j M Y \a\t H:i'),
|
||||
'updated_at' => now()->format('j M Y \a\t H:i'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return 204 status
|
||||
*
|
||||
* @param $user
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function favourites($user)
|
||||
{
|
||||
return $user->favouriteFolders->makeHidden(['pivot']);
|
||||
}
|
||||
}
|
||||
@@ -1,450 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use DB;
|
||||
use App\Models\Zip;
|
||||
use App\Models\User;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\File as UserFile;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Flysystem\FileNotFoundException;
|
||||
use App\Http\Requests\FileFunctions\RenameItemRequest;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class FileManagerService
|
||||
{
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->helper = resolve(HelperService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zip requested folder
|
||||
*
|
||||
* @param $id
|
||||
* @param $shared
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_folder($id, $shared = null)
|
||||
{
|
||||
// Get folder
|
||||
$requested_folder = Folder::with(['folders.files', 'files'])
|
||||
->where('id', $id)
|
||||
->where('user_id', Auth::id() ?? $shared->user_id)
|
||||
->with('folders')
|
||||
->first();
|
||||
|
||||
$files = get_files_for_zip($requested_folder, collect([]));
|
||||
|
||||
// Local storage instance
|
||||
$disk_local = Storage::disk('local');
|
||||
|
||||
// Move file to local storage from external storage service
|
||||
if (! is_storage_driver('local')) {
|
||||
foreach ($files as $file) {
|
||||
try {
|
||||
$disk_local->put("temp/{$file['basename']}", Storage::get("files/$requested_folder->user_id/{$file['basename']}"));
|
||||
} catch (FileNotFoundException $e) {
|
||||
throw new HttpException(404, 'File not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get zip path
|
||||
$zip_name = Str::random(16) . '-' . Str::slug($requested_folder->name) . '.zip';
|
||||
|
||||
// Create zip
|
||||
$zipper = new \Madnest\Madzipper\Madzipper;
|
||||
$zip = $zipper->make($disk_local->path("zip/$zip_name"));
|
||||
|
||||
// Add files to zip
|
||||
foreach ($files as $file) {
|
||||
$file_path = is_storage_driver('local')
|
||||
? $disk_local->path("files/$requested_folder->user_id/{$file['basename']}")
|
||||
: $disk_local->path("temp/{$file['basename']}");
|
||||
|
||||
$zip
|
||||
->folder($file['folder_path'])
|
||||
->addString("{$file['name']}.{$file['mimetype']}", File::get($file_path));
|
||||
}
|
||||
|
||||
// Close zip
|
||||
//$zip->close();
|
||||
|
||||
// Delete temporary files
|
||||
if (! is_storage_driver('local')) {
|
||||
foreach ($files as $file) {
|
||||
$disk_local->delete('temp/' . $file['basename']);
|
||||
}
|
||||
}
|
||||
|
||||
// Store zip record
|
||||
return Zip::create([
|
||||
'user_id' => $shared->user_id ?? Auth::id(),
|
||||
'shared_token' => $shared->token ?? null,
|
||||
'basename' => $zip_name,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zip selected files, store it in /zip folder and retrieve zip record
|
||||
*
|
||||
* @param $files
|
||||
* @param null $shared
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function zip_files($files, $shared = null)
|
||||
{
|
||||
// Local storage instance
|
||||
$disk_local = Storage::disk('local');
|
||||
|
||||
// Move file to local storage from external storage service
|
||||
if (! is_storage_driver('local')) {
|
||||
$files->each(function ($file) use ($disk_local) {
|
||||
try {
|
||||
$disk_local->put("temp/$file->basename", Storage::get("files/$file->user_id/$file->basename"));
|
||||
} catch (FileNotFoundException $e) {
|
||||
throw new HttpException(404, 'File not found');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Get zip path
|
||||
$zip_name = Str::random(16) . '.zip';
|
||||
|
||||
// Create zip
|
||||
$zipper = new \Madnest\Madzipper\Madzipper;
|
||||
$zip = $zipper->make($disk_local->path("zip/$zip_name"));
|
||||
|
||||
// Add files to zip
|
||||
$files->each(function ($file) use ($zip, $disk_local) {
|
||||
$file_path = is_storage_driver('local')
|
||||
? $disk_local->path("files/$file->user_id/$file->basename")
|
||||
: $disk_local->path("temp/$file->basename");
|
||||
|
||||
$zip->addString("$file->name.$file->mimetype", File::get($file_path));
|
||||
});
|
||||
|
||||
// Close zip
|
||||
//$zip->close();
|
||||
|
||||
// Delete temporary files
|
||||
if (! is_storage_driver('local')) {
|
||||
$files->each(function ($file) use ($disk_local) {
|
||||
$disk_local->delete("temp/$file->basename");
|
||||
});
|
||||
}
|
||||
|
||||
// Store zip record
|
||||
return Zip::create([
|
||||
'user_id' => $shared->user_id ?? Auth::id(),
|
||||
'shared_token' => $shared->token ?? null,
|
||||
'basename' => $zip_name,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new directory
|
||||
*
|
||||
* @param $request
|
||||
* @param null $shared
|
||||
* @return Folder|\Illuminate\Database\Eloquent\Model
|
||||
*/
|
||||
public function create_folder($request, $shared = null)
|
||||
{
|
||||
return Folder::create([
|
||||
'parent_id' => $request->parent_id,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'user_id' => $shared ? $shared->user_id : Auth::id(),
|
||||
'name' => $request->name,
|
||||
'color' => $request->color ?? null,
|
||||
'emoji' => $request->emoji ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename item name
|
||||
*
|
||||
* @param RenameItemRequest $request
|
||||
* @param $id
|
||||
* @param null $shared
|
||||
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function rename_item($request, $id, $shared = null)
|
||||
{
|
||||
// Get user id
|
||||
$user_id = $shared ? $shared->user_id : Auth::id();
|
||||
|
||||
// Get item
|
||||
$item = get_item($request->type, $id, $user_id);
|
||||
|
||||
// Rename item
|
||||
$item->update([
|
||||
'name' => $request->name,
|
||||
]);
|
||||
|
||||
// Return updated item
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file or folder
|
||||
*
|
||||
* @param $item
|
||||
* @param $id
|
||||
* @param null $shared
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function delete_item($item, $id, $shared = null)
|
||||
{
|
||||
// Delete folder
|
||||
if ($item['type'] === 'folder') {
|
||||
// Get folder
|
||||
$folder = Folder::withTrashed()
|
||||
->with('folders')
|
||||
->find($id);
|
||||
|
||||
// Get folder shared record
|
||||
$shared = Share::where('type', 'folder')
|
||||
->where('item_id', $id)
|
||||
->first();
|
||||
|
||||
// Delete folder shared record
|
||||
if ($shared) {
|
||||
$shared->delete();
|
||||
}
|
||||
|
||||
// Remove folder from user favourites
|
||||
DB::table('favourite_folder')
|
||||
->where('folder_id', $folder->id)
|
||||
->delete();
|
||||
|
||||
// Soft delete items
|
||||
if (! $item['force_delete']) {
|
||||
// Soft delete folder record
|
||||
$folder->delete();
|
||||
}
|
||||
|
||||
// Force delete children files
|
||||
if ($item['force_delete']) {
|
||||
// Get children folder ids
|
||||
$child_folders = filter_folders_ids($folder->trashed_folders, 'id');
|
||||
|
||||
// Get children files
|
||||
$files = UserFile::onlyTrashed()
|
||||
->whereIn('folder_id', Arr::flatten([$id, $child_folders]))
|
||||
->get();
|
||||
|
||||
// Remove all children files
|
||||
foreach ($files as $file) {
|
||||
// Delete file
|
||||
Storage::delete("/files/$file->user_id/$file->basename");
|
||||
|
||||
// Delete thumbnail if exist
|
||||
if ($file->thumbnail) {
|
||||
Storage::delete(
|
||||
"/files/$file->user_id/{$file->getRawOriginal('thumbnail')}"
|
||||
);
|
||||
}
|
||||
|
||||
// Delete file permanently
|
||||
$file->forceDelete();
|
||||
}
|
||||
|
||||
// Delete folder record
|
||||
$folder->forceDelete();
|
||||
}
|
||||
}
|
||||
|
||||
// Delete item
|
||||
if ($item['type'] !== 'folder') {
|
||||
// Get file
|
||||
$file = UserFile::withTrashed()
|
||||
->find($id);
|
||||
|
||||
// Get folder shared record
|
||||
$shared = Share::where('type', 'file')
|
||||
->where('item_id', $id)
|
||||
->first();
|
||||
|
||||
// Delete file shared record
|
||||
if ($shared) {
|
||||
$shared->delete();
|
||||
}
|
||||
|
||||
// Force delete file
|
||||
if ($item['force_delete']) {
|
||||
// Delete file
|
||||
Storage::delete("/files/$file->user_id/$file->basename");
|
||||
|
||||
// Delete thumbnail if exist
|
||||
if ($file->thumbnail) {
|
||||
Storage::delete(
|
||||
"/files/$file->user_id/{$file->getRawOriginal('thumbnail')}"
|
||||
);
|
||||
}
|
||||
|
||||
// Delete file permanently
|
||||
$file->forceDelete();
|
||||
}
|
||||
|
||||
// Soft delete file
|
||||
if (! $item['force_delete']) {
|
||||
// Soft delete file
|
||||
$file->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Move folder or file to new location
|
||||
*
|
||||
* @param $request
|
||||
* @param $to_id
|
||||
*/
|
||||
public function move($request, $to_id)
|
||||
{
|
||||
foreach ($request->items as $item) {
|
||||
// Move folder
|
||||
if ($item['type'] === 'folder') {
|
||||
Folder::find($item['id'])
|
||||
->update(['parent_id' => $to_id]);
|
||||
}
|
||||
|
||||
// Move file
|
||||
if ($item['type'] !== 'folder') {
|
||||
UserFile::find($item['id'])
|
||||
->update(['folder_id' => $to_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload file
|
||||
*
|
||||
* @param $request
|
||||
* @param null $shared
|
||||
* @return File|\Illuminate\Database\Eloquent\Model
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function upload($request, $shared = null)
|
||||
{
|
||||
// Get parent_id from request
|
||||
$file = $request->file('file');
|
||||
|
||||
// File name
|
||||
$user_file_name = basename('chunks/' . substr($file->getClientOriginalName(), 17), '.part');
|
||||
$disk_file_name = basename('chunks/' . $file->getClientOriginalName(), '.part');
|
||||
$temp_filename = $file->getClientOriginalName();
|
||||
|
||||
// File Path
|
||||
$file_path = Storage::disk('local')->path('chunks/' . $temp_filename);
|
||||
|
||||
// Generate file
|
||||
File::append($file_path, $file->get());
|
||||
|
||||
// Size of file
|
||||
$file_size = File::size($file_path);
|
||||
|
||||
// Size of limit
|
||||
$limit = get_setting('upload_limit');
|
||||
|
||||
// File size handling
|
||||
if ($limit && $file_size > format_bytes($limit)) {
|
||||
abort(413);
|
||||
}
|
||||
|
||||
// If last then process file
|
||||
if ($request->boolean('is_last')) {
|
||||
$metadata = get_image_meta_data($file);
|
||||
|
||||
$disk_local = Storage::disk('local');
|
||||
|
||||
// Get user data
|
||||
$user_id = $shared->user_id ?? Auth::id();
|
||||
|
||||
// File Info
|
||||
$file_size = $disk_local->size("chunks/$temp_filename");
|
||||
|
||||
$file_mimetype = $disk_local->mimeType("chunks/$temp_filename");
|
||||
|
||||
// Check if user has enough space to upload file
|
||||
$this->helper->check_user_storage_capacity($user_id, $file_size, $temp_filename);
|
||||
|
||||
// Create thumbnail
|
||||
$thumbnail = $this->helper->create_image_thumbnail("chunks/$temp_filename", $disk_file_name, $user_id);
|
||||
|
||||
// Move finished file from chunk to file-manager directory
|
||||
$disk_local->move("chunks/$temp_filename", "files/$user_id/$disk_file_name");
|
||||
|
||||
// Move files to external storage
|
||||
if (! is_storage_driver(['local'])) {
|
||||
$this->helper->move_file_to_external_storage($disk_file_name, $user_id);
|
||||
}
|
||||
|
||||
// Store user upload size
|
||||
User::find($user_id)
|
||||
->record_upload($file_size);
|
||||
|
||||
// Return new file
|
||||
return UserFile::create([
|
||||
'mimetype' => get_file_type_from_mimetype($file_mimetype),
|
||||
'type' => get_file_type($file_mimetype),
|
||||
'folder_id' => $request->folder_id,
|
||||
'metadata' => $metadata,
|
||||
'name' => $request->filename,
|
||||
'basename' => $disk_file_name,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'thumbnail' => $thumbnail,
|
||||
'filesize' => $file_size,
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Store folder icon
|
||||
*
|
||||
* @param $request
|
||||
* @param $id
|
||||
*/
|
||||
public function edit_folder_properties($request, $id)
|
||||
{
|
||||
// Get folder
|
||||
$folder = Folder::find($id);
|
||||
|
||||
// Set default folder icon
|
||||
if ($request->emoji === 'default') {
|
||||
$folder->update([
|
||||
'emoji' => null,
|
||||
'color' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
// Set emoji
|
||||
if ($request->filled('emoji')) {
|
||||
$folder->update([
|
||||
'emoji' => $request->emoji,
|
||||
'color' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
// Set color
|
||||
if ($request->filled('color')) {
|
||||
$folder->update([
|
||||
'emoji' => null,
|
||||
'color' => $request->color,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,310 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use DB;
|
||||
use App\Models\File;
|
||||
use App\Models\Share;
|
||||
use App\Models\Folder;
|
||||
use Illuminate\Support\Arr;
|
||||
use Aws\S3\MultipartUploader;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Aws\Exception\MultipartUploadException;
|
||||
use Intervention\Image\ImageManagerStatic as Image;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class HelperService
|
||||
{
|
||||
/**
|
||||
* Delete all user data including files, folders, avatar etc.
|
||||
*
|
||||
* @param $user
|
||||
*/
|
||||
public function erase_user_data($user)
|
||||
{
|
||||
// Delete user avatar if exists
|
||||
if ($user->settings->getRawOriginal('avatar')) {
|
||||
Storage::delete($user->settings->getRawOriginal('avatar'));
|
||||
}
|
||||
|
||||
// Delete all user files
|
||||
Storage::deleteDirectory("files/$user->id");
|
||||
|
||||
// Delete all user records in database
|
||||
collect(['folders', 'files', 'user_settings', 'shares', 'favourite_folder', 'zips'])
|
||||
->each(function ($table) use ($user) {
|
||||
DB::table($table)
|
||||
->whereUserId($user->id)
|
||||
->delete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check access to requested directory
|
||||
*
|
||||
* @param int|array $requested_id
|
||||
* @param string $shared Shared record detail
|
||||
*/
|
||||
public function check_item_access($requested_id, $shared)
|
||||
{
|
||||
// Get all children folders
|
||||
$foldersIds = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('user_id', $shared->user_id)
|
||||
->where('parent_id', $shared->item_id)
|
||||
->get();
|
||||
|
||||
// Get all authorized parent folders by shared folder as root of tree
|
||||
$accessible_folder_ids = Arr::flatten([filter_folders_ids($foldersIds), $shared->item_id]);
|
||||
|
||||
// Check user access
|
||||
if (is_array($requested_id)) {
|
||||
foreach ($requested_id as $id) {
|
||||
if (! in_array($id, $accessible_folder_ids)) {
|
||||
abort(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! is_array($requested_id)) {
|
||||
if (! in_array($requested_id, $accessible_folder_ids)) {
|
||||
abort(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check user file access
|
||||
*
|
||||
* @param $shared
|
||||
* @param $file
|
||||
*/
|
||||
public function check_guest_access_to_shared_items($shared, $file): void
|
||||
{
|
||||
// Check by parent folder permission
|
||||
if ($shared->type === 'folder') {
|
||||
$this->check_item_access($file->folder_id, $shared);
|
||||
}
|
||||
|
||||
// Check by single file permission
|
||||
if ($shared->type === 'file') {
|
||||
if ($shared->item_id !== $file->id) {
|
||||
abort(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has enough space to upload file
|
||||
*
|
||||
* @param $user_id
|
||||
* @param int $file_size
|
||||
* @param $temp_filename
|
||||
*/
|
||||
public function check_user_storage_capacity($user_id, int $file_size, $temp_filename): void
|
||||
{
|
||||
// Get user storage percentage and get storage_limitation setting
|
||||
$user_storage_used = user_storage_percentage($user_id, $file_size);
|
||||
|
||||
// Check if user can upload
|
||||
if (get_setting('storage_limitation') && $user_storage_used >= 100) {
|
||||
// Delete file
|
||||
Storage::disk('local')
|
||||
->delete("chunks/$temp_filename");
|
||||
|
||||
// Abort uploading
|
||||
// TODO: test pre exceed storage limit
|
||||
abort(423, 'You exceed your storage limit!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Move file to external storage if is set
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $user_id
|
||||
*/
|
||||
public function move_file_to_external_storage($file, $user_id): void
|
||||
{
|
||||
$disk_local = \Storage::disk('local');
|
||||
|
||||
// Get file size
|
||||
$filesize = $disk_local->size("files/$user_id/$file");
|
||||
|
||||
// If file is bigger than 5.2MB then run multipart upload
|
||||
if ($filesize > 5242880) {
|
||||
// Get driver
|
||||
$driver = \Storage::getDriver();
|
||||
|
||||
// Get adapter
|
||||
$adapter = $driver->getAdapter();
|
||||
|
||||
// Get client
|
||||
$client = $adapter->getClient();
|
||||
|
||||
// Prepare the upload parameters.
|
||||
// TODO: replace local files with temp folder
|
||||
$uploader = new MultipartUploader($client, config('filesystems.disks.local.root') . "/files/$user_id/$file", [
|
||||
'bucket' => $adapter->getBucket(),
|
||||
'key' => "files/$user_id/$file",
|
||||
]);
|
||||
|
||||
try {
|
||||
// Upload content
|
||||
$uploader->upload();
|
||||
} catch (MultipartUploadException $e) {
|
||||
// Write error log
|
||||
Log::error($e->getMessage());
|
||||
|
||||
// Delete file after error
|
||||
$disk_local->delete("files/$user_id/$file");
|
||||
|
||||
throw new HttpException(409, $e->getMessage());
|
||||
}
|
||||
} else {
|
||||
// Stream file object to s3
|
||||
// TODO: replace local files with temp folder
|
||||
Storage::putFileAs("files/$user_id", config('filesystems.disks.local.root') . "/files/$user_id/$file", $file, 'private');
|
||||
}
|
||||
|
||||
// Delete file after upload
|
||||
$disk_local->delete("files/$user_id/$file");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create image thumbnail from gif, jpeg, jpg, png, webp or svg
|
||||
*
|
||||
* @param string $file_path
|
||||
* @param string $filename
|
||||
* @param string $user_id
|
||||
* @return string|null
|
||||
*/
|
||||
public function create_image_thumbnail($file_path, $filename, $user_id)
|
||||
{
|
||||
// Create thumbnail from image
|
||||
if (in_array(Storage::disk('local')->mimeType($file_path), ['image/gif', 'image/jpeg', 'image/jpg', 'image/png', 'image/webp'])) {
|
||||
// Get thumbnail name
|
||||
$thumbnail = "thumbnail-$filename";
|
||||
|
||||
// Create intervention image
|
||||
$image = Image::make(Storage::disk('local')->path($file_path))
|
||||
->orientate();
|
||||
|
||||
// Resize image
|
||||
$image->resize(512, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
})->stream();
|
||||
|
||||
// Store thumbnail to disk
|
||||
Storage::put("files/$user_id/$thumbnail", $image);
|
||||
}
|
||||
|
||||
// Return thumbnail as svg file
|
||||
if (Storage::disk('local')->mimeType($file_path) === 'image/svg+xml') {
|
||||
$thumbnail = $filename;
|
||||
}
|
||||
|
||||
return $thumbnail ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call and download file
|
||||
*
|
||||
* @param $file
|
||||
* @param $user_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function download_file($file, $user_id)
|
||||
{
|
||||
// Get file path
|
||||
$path = "files/$user_id/$file->basename";
|
||||
|
||||
// Check if file exist
|
||||
if (! Storage::exists($path)) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
// Get pretty name
|
||||
$pretty_name = get_pretty_name($file->basename, $file->name, $file->mimetype);
|
||||
|
||||
return response()
|
||||
->download(Storage::path($path), $pretty_name, [
|
||||
'Accept-Ranges' => 'bytes',
|
||||
'Content-Type' => Storage::mimeType($path),
|
||||
'Content-Length' => Storage::size($path),
|
||||
'Content-Range' => 'bytes 0-600/' . Storage::size($path),
|
||||
'Content-Disposition' => "attachment; filename=$pretty_name",
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image thumbnail for browser
|
||||
*
|
||||
* @param $file
|
||||
* @param $user_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function download_thumbnail_file($file, $user_id)
|
||||
{
|
||||
// Get file path
|
||||
$path = "/files/$user_id/{$file->getRawOriginal('thumbnail')}";
|
||||
|
||||
// Check if file exist
|
||||
if (! Storage::exists($path)) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
// Return image thumbnail
|
||||
return Storage::download($path, $file->getRawOriginal('thumbnail'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all folders and files under the share record
|
||||
*
|
||||
* @param $id
|
||||
* @param $shared
|
||||
* @return array
|
||||
*/
|
||||
public function get_items_under_shared_by_folder_id($id, $shared): array
|
||||
{
|
||||
$folders = Folder::where('user_id', $shared->user_id)
|
||||
->where('parent_id', $id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::where('user_id', $shared->user_id)
|
||||
->where('folder_id', $id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
return [$folders, $files];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Share $shared
|
||||
*/
|
||||
public function check_protected_share_record(Share $shared): void
|
||||
{
|
||||
if ($shared->is_protected) {
|
||||
$abort_message = "Sorry, you don't have permission";
|
||||
|
||||
if (! request()->hasCookie('share_session')) {
|
||||
abort(403, $abort_message);
|
||||
}
|
||||
|
||||
// Get shared session
|
||||
$share_session = json_decode(
|
||||
request()->cookie('share_session')
|
||||
);
|
||||
|
||||
// Check if is requested same share record
|
||||
if ($share_session->token !== $shared->token) {
|
||||
abort(403, $abort_message);
|
||||
}
|
||||
|
||||
// Check if share record was authenticated previously via ShareController@authenticate
|
||||
if (! $share_session->authenticated) {
|
||||
abort(403, $abort_message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use DB;
|
||||
use App\Models\Language;
|
||||
use App\Models\LanguageTranslation;
|
||||
|
||||
class LanguageService
|
||||
{
|
||||
/**
|
||||
* @param $license
|
||||
* @param $locale
|
||||
*/
|
||||
public function create_default_language_translations($license, $locale)
|
||||
{
|
||||
$translations = [
|
||||
'extended' => collect([
|
||||
config('language-translations.extended'),
|
||||
config('language-translations.regular'),
|
||||
config('custom-language-translations'),
|
||||
])->collapse(),
|
||||
'regular' => collect([
|
||||
config('language-translations.regular'),
|
||||
config('custom-language-translations'),
|
||||
])->collapse(),
|
||||
];
|
||||
|
||||
$translations = $translations[strtolower($license)]
|
||||
->map(function ($value, $key) use ($locale) {
|
||||
return [
|
||||
'lang' => $locale,
|
||||
'value' => $value,
|
||||
'key' => $key,
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
$chunks = array_chunk($translations, 100);
|
||||
|
||||
foreach ($chunks as $chunk) {
|
||||
DB::table('language_translations')
|
||||
->insert($chunk);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find newly added translations in default language
|
||||
* translations file and insert it into database
|
||||
*/
|
||||
public function upgrade_language_translations()
|
||||
{
|
||||
// Get all app locales
|
||||
$locales = Language::all()
|
||||
->pluck('locale');
|
||||
|
||||
// Get default translations
|
||||
$translations = LanguageTranslation::whereLang('en')
|
||||
->get();
|
||||
|
||||
$default_translations = [
|
||||
'extended' => collect([
|
||||
config('language-translations.extended'),
|
||||
config('language-translations.regular'),
|
||||
config('custom-language-translations'),
|
||||
])->collapse(),
|
||||
'regular' => collect([
|
||||
config('language-translations.regular'),
|
||||
config('custom-language-translations'),
|
||||
])->collapse(),
|
||||
];
|
||||
|
||||
$license = strtolower(get_setting('license'));
|
||||
|
||||
// Find new translations in default translations
|
||||
$newbies = $default_translations[$license]
|
||||
->diffKeys(map_language_translations($translations));
|
||||
|
||||
// Store new translations for every language
|
||||
$locales->each(function ($locale) use ($newbies) {
|
||||
$translations = $newbies
|
||||
->map(function ($value, $key) use ($locale) {
|
||||
return [
|
||||
'lang' => $locale,
|
||||
'value' => $value,
|
||||
'key' => $key,
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
$chunks = array_chunk($translations, 100);
|
||||
|
||||
foreach ($chunks as $chunk) {
|
||||
// Store translations into database
|
||||
DB::table('language_translations')
|
||||
->insert($chunk);
|
||||
}
|
||||
|
||||
// Flush cache
|
||||
cache()->forget("language-translations-$locale");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Zip;
|
||||
use App\Models\Share;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class SchedulerService
|
||||
{
|
||||
/**
|
||||
* Delete old zips
|
||||
*/
|
||||
public function delete_old_zips(): void
|
||||
{
|
||||
Zip::where('created_at', '<=', now()->subDay()->toDateTimeString())
|
||||
->get()
|
||||
->each(function ($zip) {
|
||||
// Delete zip file
|
||||
Storage::disk('local')->delete("zip/$zip->basename");
|
||||
|
||||
// Delete zip record
|
||||
$zip->delete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and delete expired shared links
|
||||
*/
|
||||
public function delete_expired_shared_links(): void
|
||||
{
|
||||
Share::whereNotNull('expire_in')
|
||||
->get()
|
||||
->each(function ($share) {
|
||||
// Get dates
|
||||
$created_at = Carbon::parse($share->created_at);
|
||||
|
||||
// If time was over, then delete share record
|
||||
if ($created_at->diffInHours(now()) >= $share->expire_in) {
|
||||
$share->delete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and delete failed files older than 24 hours
|
||||
*/
|
||||
public function delete_failed_files(): void
|
||||
{
|
||||
$local_disk = Storage::disk('local');
|
||||
|
||||
// Get all files from storage
|
||||
$files = collect([
|
||||
//$local_disk->allFiles('files'),
|
||||
$local_disk->allFiles('chunks'),
|
||||
])->collapse();
|
||||
|
||||
$files->each(function ($file) use ($local_disk) {
|
||||
// Get the file's last modification time.
|
||||
$last_modified = $local_disk
|
||||
->lastModified($file);
|
||||
|
||||
// Get diffInHours
|
||||
$diff = Carbon::parse($last_modified)
|
||||
->diffInHours(now());
|
||||
|
||||
// Delete if file is in local storage more than 24 hours
|
||||
if ($diff >= 24) {
|
||||
Log::info("Failed file or chunk $file deleted.");
|
||||
|
||||
// Delete file from local storage
|
||||
$local_disk->delete($file);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Page;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Language;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class SetupService
|
||||
{
|
||||
/**
|
||||
* Create default folders which application to process files.
|
||||
*/
|
||||
public function create_directories()
|
||||
{
|
||||
collect(['avatars', 'chunks', 'system', 'files', 'temp', 'zip'])
|
||||
->each(function ($directory) {
|
||||
// Create directory for local driver
|
||||
Storage::disk('local')
|
||||
->makeDirectory($directory);
|
||||
|
||||
// Create directory for external driver
|
||||
Storage::makeDirectory($directory);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Store default pages content like Terms of Service, Privacy Policy and Cookie Policy into database
|
||||
*/
|
||||
public function seed_default_pages()
|
||||
{
|
||||
collect(config('content.pages'))
|
||||
->each(function ($page) {
|
||||
Page::updateOrCreate($page);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Store default VueFileManager settings into database
|
||||
*
|
||||
* @param $license
|
||||
*/
|
||||
public function seed_default_settings($license)
|
||||
{
|
||||
collect(config('content.content.' . strtolower($license)))
|
||||
->each(function ($content) {
|
||||
Setting::forceCreate($content);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Store default VueFileManager settings into database
|
||||
*
|
||||
* @param $license
|
||||
*/
|
||||
public function seed_default_language()
|
||||
{
|
||||
Language::create([
|
||||
'name' => 'English',
|
||||
'locale' => 'en',
|
||||
]);
|
||||
|
||||
Setting::create([
|
||||
'name' => 'language',
|
||||
'value' => 'en',
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,411 +0,0 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use Stripe;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Cashier\Cashier;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Laravel\Cashier\Exceptions\IncompletePayment;
|
||||
use Laravel\Cashier\Exceptions\PaymentActionRequired;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class StripeService
|
||||
{
|
||||
private \Cartalyst\Stripe\Stripe $stripe;
|
||||
|
||||
/**
|
||||
* Stripe Service constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->stripe = Stripe::make(config('cashier.secret'), '2020-03-02');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get setup intent
|
||||
*
|
||||
* @param $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function getSetupIntent($user)
|
||||
{
|
||||
// Create stripe customer if not exist
|
||||
$user->createOrGetStripeCustomer();
|
||||
|
||||
// Return setup intent
|
||||
return $user->createSetupIntent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tax rate ids
|
||||
* @return array
|
||||
*/
|
||||
public function getTaxRates()
|
||||
{
|
||||
return $this->stripe
|
||||
->taxRates()
|
||||
->all()['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plan tax rates
|
||||
*
|
||||
* @param $amount
|
||||
* @return array
|
||||
*/
|
||||
public function get_tax_rates($amount): array
|
||||
{
|
||||
$rates_public = [];
|
||||
|
||||
foreach ($this->getTaxRates() as $rate) {
|
||||
// Continue when is not active
|
||||
if (! $rate['active']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Calculate tax
|
||||
$tax = $amount * ($rate['percentage'] / 100);
|
||||
|
||||
array_push($rates_public, [
|
||||
'id' => $rate['id'],
|
||||
'active' => $rate['active'],
|
||||
'country' => $rate['country'],
|
||||
'percentage' => $rate['percentage'],
|
||||
'plan_price_formatted' => Cashier::formatAmount(round($amount + $tax)),
|
||||
]);
|
||||
}
|
||||
|
||||
return $rates_public;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default payment option or set new default payment
|
||||
*
|
||||
* @param $request
|
||||
* @param $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function getOrSetDefaultPaymentMethod($request, $user)
|
||||
{
|
||||
// Check payment method
|
||||
if (! $request->has('payment.meta.pm') && $user->hasDefaultPaymentMethod()) {
|
||||
// Get default payment
|
||||
return $user->defaultPaymentMethod()->paymentMethod;
|
||||
}
|
||||
|
||||
// Clear cached payment methods
|
||||
cache_forget_many([
|
||||
'payment-methods-user-' . $user->id,
|
||||
'default-payment-methods-user-' . $user->id,
|
||||
]);
|
||||
|
||||
if ($request->has('payment.meta.pm') && $user->hasDefaultPaymentMethod()) {
|
||||
// Set new payment
|
||||
return $user->addPaymentMethod($request->input('payment.meta.pm'))->paymentMethod;
|
||||
} elseif ($request->has('payment.meta.pm') && ! $user->hasDefaultPaymentMethod()) {
|
||||
// Set new payment
|
||||
return $user->updateDefaultPaymentMethod($request->input('payment.meta.pm'))->paymentMethod;
|
||||
}
|
||||
|
||||
throw new HttpException(400, 'Something went wrong.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new payment method
|
||||
*
|
||||
* @param $request
|
||||
* @param $user
|
||||
*/
|
||||
public function registerNewPaymentMethod($request, $user): void
|
||||
{
|
||||
// Clear cached payment methods
|
||||
cache_forget_many([
|
||||
'payment-methods-user-' . $user->id,
|
||||
'default-payment-methods-user-' . $user->id,
|
||||
]);
|
||||
|
||||
// Set new payment method
|
||||
$user->addPaymentMethod($request->token)->paymentMethod;
|
||||
|
||||
// Set new default payment
|
||||
if ($request->default) {
|
||||
$user->updateDefaultPaymentMethod($request->token)->paymentMethod;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new subscription or replace by new subscription
|
||||
*
|
||||
* @param $request
|
||||
* @param $user
|
||||
*/
|
||||
public function createOrReplaceSubscription($request, $user): void
|
||||
{
|
||||
try {
|
||||
// Get payment method
|
||||
$paymentMethod = $this->getOrSetDefaultPaymentMethod($request, $user);
|
||||
|
||||
// Check if user have subscription
|
||||
if ($user->subscribed('main')) {
|
||||
// Change subscription plan
|
||||
$user->subscription('main')->skipTrial()->swap($request->input('plan.data.id'));
|
||||
} else {
|
||||
// Create subscription
|
||||
$user->newSubscription('main', $request->input('plan.data.id'))->create($paymentMethod);
|
||||
}
|
||||
} catch (IncompletePayment $exception) {
|
||||
if ($exception instanceof PaymentActionRequired) {
|
||||
$cashier_route = route('cashier.payment', [$exception->payment->id, 'redirect' => url('/settings/subscription')]);
|
||||
|
||||
throw new HttpException(402, $cashier_route);
|
||||
}
|
||||
|
||||
throw new HttpException(400, $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update customer details
|
||||
*
|
||||
* @param $user
|
||||
*/
|
||||
public function updateCustomerDetails($user)
|
||||
{
|
||||
$user->updateStripeCustomer([
|
||||
'name' => $user->settings->name,
|
||||
'phone' => $user->settings->phone_number,
|
||||
'address' => [
|
||||
'line1' => $user->settings->address,
|
||||
'city' => $user->settings->city,
|
||||
'country' => $user->settings->country,
|
||||
'postal_code' => $user->settings->postal_code,
|
||||
'state' => $user->settings->state,
|
||||
],
|
||||
'preferred_locales' => [
|
||||
$user->settings->country, 'en',
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all plans
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPlans()
|
||||
{
|
||||
// Get stripe plans
|
||||
$stripe_plans = $this->stripe->plans()->all([
|
||||
'limit' => 100,
|
||||
]);
|
||||
|
||||
// Plans container
|
||||
$plans = [];
|
||||
|
||||
foreach ($stripe_plans['data'] as $plan) {
|
||||
// Get stripe product
|
||||
$product = $this->stripe->products()->find($plan['product']);
|
||||
|
||||
// Push data to $plan container
|
||||
if ($product['active'] && isset($product['metadata']['capacity'])) {
|
||||
array_push($plans, [
|
||||
'plan' => $plan,
|
||||
'product' => $product,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return $plans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all active plans
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getActivePlans()
|
||||
{
|
||||
// Get stripe plans
|
||||
$stripe_plans = $this->stripe->plans()->all([
|
||||
'limit' => 100,
|
||||
]);
|
||||
|
||||
// Plans container
|
||||
$plans = [];
|
||||
|
||||
foreach ($stripe_plans['data'] as $plan) {
|
||||
if ($plan['active']) {
|
||||
// Get stripe product
|
||||
$product = $this->stripe->products()->find($plan['product']);
|
||||
|
||||
// Push data to $plan container
|
||||
if ($product['active'] && isset($product['metadata']['capacity'])) {
|
||||
array_push($plans, [
|
||||
'plan' => $plan,
|
||||
'product' => $product,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $plans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plan details
|
||||
*
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPlan($id)
|
||||
{
|
||||
if (Cache::has("plan-$id")) {
|
||||
return Cache::get("plan-$id");
|
||||
}
|
||||
|
||||
return Cache::rememberForever("plan-$id", function () use ($id) {
|
||||
$plan = $this->stripe->plans()->find($id);
|
||||
$product = $this->stripe->products()->find($plan['product']);
|
||||
|
||||
return [
|
||||
'plan' => $plan,
|
||||
'product' => $product,
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create plan
|
||||
*
|
||||
* @param $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function createPlan($data)
|
||||
{
|
||||
if ($data instanceof Request) {
|
||||
$plan = [
|
||||
'name' => $data->input('attributes.name'),
|
||||
'description' => $data->input('attributes.description'),
|
||||
'price' => $data->input('attributes.price'),
|
||||
'capacity' => $data->input('attributes.capacity'),
|
||||
];
|
||||
} else {
|
||||
$plan = [
|
||||
'name' => $data['attributes']['name'],
|
||||
'description' => $data['attributes']['description'],
|
||||
'price' => $data['attributes']['price'],
|
||||
'capacity' => $data['attributes']['capacity'],
|
||||
];
|
||||
}
|
||||
|
||||
$product = $this->stripe->products()->create([
|
||||
'name' => $plan['name'],
|
||||
'description' => $plan['description'],
|
||||
'metadata' => [
|
||||
'capacity' => $plan['capacity'],
|
||||
],
|
||||
]);
|
||||
|
||||
$plan = $this->stripe->plans()->create([
|
||||
'id' => Str::slug($plan['name']),
|
||||
'amount' => $plan['price'],
|
||||
'currency' => config('cashier.currency'),
|
||||
'interval' => 'month',
|
||||
'product' => $product['id'],
|
||||
]);
|
||||
|
||||
return compact('plan', 'product');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update plan
|
||||
*
|
||||
* @param $request
|
||||
* @param $id
|
||||
*/
|
||||
public function updatePlan($request, $id)
|
||||
{
|
||||
$plan_colls = ['is_active', 'price'];
|
||||
$product_colls = ['name', 'description', 'capacity'];
|
||||
|
||||
$plan = $this->stripe->plans()->find($id);
|
||||
|
||||
// Update product
|
||||
if (in_array($request->name, $product_colls)) {
|
||||
if ($request->name === 'capacity') {
|
||||
$this->stripe->products()->update($plan['product'], ['metadata' => ['capacity' => $request->value]]);
|
||||
}
|
||||
|
||||
if ($request->name === 'name') {
|
||||
$this->stripe->products()->update($plan['product'], ['name' => $request->value]);
|
||||
}
|
||||
|
||||
if ($request->name === 'description') {
|
||||
$this->stripe->products()->update($plan['product'], ['description' => $request->value]);
|
||||
}
|
||||
}
|
||||
|
||||
// Update plan
|
||||
if (in_array($request->name, $plan_colls)) {
|
||||
if ($request->name === 'is_active') {
|
||||
$this->stripe->plans()->update($id, ['active' => $request->value]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete plan
|
||||
*
|
||||
* @param $slug
|
||||
*/
|
||||
public function deletePlan($slug)
|
||||
{
|
||||
$this
|
||||
->stripe
|
||||
->plans()
|
||||
->delete($slug);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all user invoices
|
||||
*
|
||||
* @param $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function getUserInvoices($user)
|
||||
{
|
||||
return $user
|
||||
->invoices();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user invoice by id
|
||||
*
|
||||
* @param $customer
|
||||
* @param $id
|
||||
* @return \Laravel\Cashier\Invoice|null
|
||||
*/
|
||||
public function getUserInvoice($customer, $id)
|
||||
{
|
||||
return User::whereStripeId($customer)
|
||||
->firstOrFail()
|
||||
->findInvoice($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all invoices
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getInvoices()
|
||||
{
|
||||
return $this
|
||||
->stripe
|
||||
->invoices()
|
||||
->all([
|
||||
'limit' => 20,
|
||||
]);
|
||||
}
|
||||
}
|
||||
873
changelog.md
Normal file
873
changelog.md
Normal file
@@ -0,0 +1,873 @@
|
||||
## Version 2.2.2
|
||||
#### Release date: 16. July 2022
|
||||
- Fixed issue when email wasn't sent in active app language
|
||||
- Fixed issue with subscription module loading
|
||||
|
||||
## Version 2.2.1
|
||||
#### Release date: 1. July 2022
|
||||
### New Usage Restriction Rules for User Accounts for Metered Billing
|
||||
- Allow limiting max usage before users will be forced to increase balance in first month of account existence
|
||||
- Force users to increase balance when usage is bigger than their current balance
|
||||
|
||||
#### Release date: 29. Jun 2022
|
||||
- Fixed reCaptcha for the contact form
|
||||
|
||||
## Version 2.2.0.13
|
||||
#### Release date: 29. Jun 2022
|
||||
- Extended login time up to 3 months
|
||||
- Fixed deleted at language string in grid view browsed in trash section
|
||||
|
||||
- ## Version 2.2.0.12
|
||||
#### Release date: 28. Jun 2022
|
||||
- Fixed paystack transaction issue
|
||||
|
||||
## Version 2.2.0.11
|
||||
#### Release date: 27. Jun 2022
|
||||
- Added hint to set cron command in dashboard panel when cron is not set correctly
|
||||
|
||||
## Version 2.2.0.10
|
||||
#### Release date: 27. Jun 2022
|
||||
- Fixed issue with downloading certain file types when you are using Backblaze storage driver
|
||||
- Fixed issue when Google Analytics doesn't record visitors
|
||||
|
||||
## Version 2.2.0.9
|
||||
#### Release date: 23. Jun 2022
|
||||
- Added spinner when pdf is loading
|
||||
- Set sandbox/live mode in PayPal key configuration setup form
|
||||
- Fixed issue when after deleting user, the related subscription wasn't deleted
|
||||
- Fixed issue when you perform composer update with private repository
|
||||
- Fixed issue where change in sorting option will duplicate the content in file view
|
||||
- Fixed issue where Dragged & Dropped folder from desktop didn't start uploading
|
||||
- Fixed issue when you upload empty .txt file, it stops the upload process
|
||||
|
||||
## Version 2.2.0.8
|
||||
#### Release date: 15. Jun 2022
|
||||
- Fixed issue when you tried switch to another language, the language stay same
|
||||
|
||||
## Version 2.2.0.7
|
||||
#### Release date: 13. Jun 2022
|
||||
- Solved issue when you click on the PayPal logo it makes the new copy of the payment buttons
|
||||
|
||||
## Version 2.2.0.6
|
||||
#### Release date: 13. Jun 2022
|
||||
- Solved issue when user wasn't redirected into stripe checkout
|
||||
|
||||
## Version 2.2.0.5
|
||||
#### Release date: 12. Jun 2022
|
||||
- Solved issue with showing trash content (Affected since 2.2.0)
|
||||
|
||||
## Version 2.2
|
||||
#### Release date: 18. May 2022
|
||||
|
||||
### Fixes
|
||||
- Solved issue with database backup notifications
|
||||
- Solved issue where after team member was invited into team folder, email with urging the recipient to create new account was sent
|
||||
- You are now allowed to set price for metered billing in 3 decimal places
|
||||
- Solved UI issue with empty notification popup
|
||||
- Plans in fixed subscription are now automatically sorted from lower to higher price
|
||||
- When new user was created via admin, the verification email was send
|
||||
- Item name in list view type is now extended on the full page width
|
||||
|
||||
### New Features
|
||||
- API version 1 released
|
||||
- Paginated records loading with infinity scroller
|
||||
- If you send file request for native user via email option, the push notification will be sent to the user
|
||||
- Ability to test your websocket (Broadcasting) connection via Admin / Server / Broadcasting tab
|
||||
|
||||
## Version 2.1.3
|
||||
#### Release date: 10. May 2022
|
||||
- Ability to manually synchronize plans in fixed subscription type
|
||||
- Improved sanitization for .env values to prevent crash your app
|
||||
- Improved reCaptcha validation errors
|
||||
- Fixed issue when upload doesn't start after you drag the file into empty view
|
||||
- Fixed issue when homepage flash to sign in screen after the homepage was disabled in admin panel
|
||||
- Fixed trash navigator issue
|
||||
- Fixed issue when you create plan with 0 team members amount
|
||||
|
||||
## Version 2.1.2
|
||||
#### Release date: 8. May 2022
|
||||
- Fixed issue with chunk uploads (Critical issue affected since 2.1.1)
|
||||
- Fixed issue with creating plan with unlimited team members
|
||||
|
||||
## Version 2.1.1
|
||||
#### Release date: 29. April 2022
|
||||
- Fixed issue with reading image upload
|
||||
|
||||
## Version 2.1.0
|
||||
#### Release date: 25. April 2022
|
||||
- New remote upload function
|
||||
- Broadcast server implementation, for more info check [Broadcasting Guide](https://gist.github.com/MakingCG/a702a112be63bc6f0032dd55522327cf#broadcasting)
|
||||
|
||||
## Version 2.0.19
|
||||
#### Release date: 21. April 2022
|
||||
- Fixed issue with Backblaze credentials set up
|
||||
- The switch button in archived plans is now hidden
|
||||
- updated readme.md
|
||||
- Fixed upload progressbar in mobile version
|
||||
- Added Viet Nam language into the language editor
|
||||
|
||||
## Version 2.0.18
|
||||
#### Release date: 19. April 2022
|
||||
- Fixed issue with Google login button
|
||||
- Fixed issue with PayPal subscription
|
||||
|
||||
## Version 2.0.17
|
||||
#### Release date: 12. April 2022
|
||||
- Added option to use FTP as VueFileManager file storage server
|
||||
|
||||
## Version 2.0.16
|
||||
#### Release date: 8. April 2022
|
||||
- Test mailgun, ses and postmark connection before storing your credentials into the app
|
||||
- UI enhancements & fixes
|
||||
|
||||
## Version 2.0.15
|
||||
#### Release date: 6. April 2022
|
||||
- Wasabi region list updated
|
||||
- The delay after first upload in file request when the interface wasn't showing was removed
|
||||
- If adsense banner location isn't filled, the ads space won't be showed
|
||||
- Fixed issue when in grid view you tried to move image into another folder
|
||||
- Fixed issue when you can't move or delete items via mobile multiselect function
|
||||
- You can now open searched file from spotlight in FilePreview mode to access file settings and functions
|
||||
|
||||
## Version 2.0.14
|
||||
#### Release date: 5. April 2022
|
||||
- Added option to set default max team members for new user registrations
|
||||
- Added new app settings shortcuts findable by spotlight - Application, Login & Registration, Appearance, Adsense, Homepage, Environment, Server
|
||||
- Now in 2fa set up challenge user is required to confirm his app setup with code
|
||||
|
||||
## Version 2.0.13
|
||||
#### Release date: 4. April 2022
|
||||
- Auto plan synchronization improvements.
|
||||
- Fixed issue with thumbnails in grid preview type
|
||||
- PayPal sandbox option was added into PayPal credentials setup
|
||||
- Fixed issue in mobile spotlight where you trying open searched image
|
||||
|
||||
## Version 2.0.12
|
||||
#### Release date: 2. April 2022
|
||||
- Added status column to the fixed plan table
|
||||
- Ability to delete fixed plan if there isn't any subscribed user
|
||||
- Improved error handling in subscription module
|
||||
|
||||
## Version 2.0.11
|
||||
#### Release date: 1. April 2022
|
||||
- Improved email setup in administration settings and setup wizard
|
||||
- Ability to set custom s3 compatible service in administration settings and setup wizard
|
||||
- Test s3 connection before set up in administration settings and setup wizard
|
||||
- Test smtp connection before set up in administration settings and setup wizard
|
||||
|
||||
## Version 2.0.0 - 2.0.10
|
||||
#### Release date: 31. March 2022
|
||||
- You can now generate link for direct download via context menu in copy link input
|
||||
- You can now upgrade from regular to extended license version via admin panel
|
||||
- Fixed issue with .dwg file icon
|
||||
- You can now set uploading chunk file size directly in your admin
|
||||
- Team Folders and Shared With Me root folder has now disabled delete/move function
|
||||
- When you invite someone to your team folder, all his usage (storage, bandwidth) will be on behalf of you, not the member
|
||||
- Fixed issue when you are moving folders between your Team Folders and Private files and vice versa
|
||||
- Fixed issue when downloading bandwidth doesn't write to the user total bandwidth stats
|
||||
- Fixed issue with language strings which indicate limited/unlimited team members in fixed plans
|
||||
- Fixed issue when you are trying delete user registered with only the first name
|
||||
- Fixed issue with Adsense where banners wasn't placed correctly by their described location
|
||||
|
||||
## Version 2.0.0
|
||||
#### Release date: 21. March 2022
|
||||
|
||||
**User Interface**
|
||||
- Fullscreen mode can be set by double arrow icon on top of navigation sidebar in file page or by action in spotlight
|
||||
- In mobile version you can now by opening image or document move seamlessly to another by swipe gesture
|
||||
- Emoji picker was redesigned and now offer better experience to pick your favourite emoji for your folder icon
|
||||
- Actions like create folder, upload files and any others was moved and grouped by 'Frequently used' and 'Others' category under single button
|
||||
- User profile, Dashboard and other admin pages was redesigned
|
||||
- Mac users can now switch between native emojis and twemojis
|
||||
- New button to switch between dark/light mode was added under the main navigation in desktop
|
||||
- Now when you undo in your browser, it goes back to the previous folder
|
||||
|
||||
**Spotlight**
|
||||
- Search through your files and folders
|
||||
- Can be used as quick navigation through your folders or app pages
|
||||
- Ability to search actions like toggle emojis, toggle dark/light mode, creating file request, new user and many more
|
||||
- Search your users by activating user filter with keyboard shortcut (u+space)
|
||||
- Ability to call spotlight with cmd/ctrl + k from any location in app like admin or user profile
|
||||
- Ability from any location in the app to show document, image or video in file preview component
|
||||
- Ability to use keyboard shortcuts to navigate in spotlight like arrow up/down, enter
|
||||
|
||||
**Collaboration**
|
||||
- New Team Folders and Shared with Me categories
|
||||
- Ability to create new team folder and invite users by email invitation, or if user is app user, then push notification will be sent as well.
|
||||
- Ability to convert existing folder into Team Folder and invite members into it.
|
||||
- Ability to dissolve your team folder. All members permissions will be revoked and your folder will be moved into My Files category.
|
||||
- Ability to leave folder if you are member of someone team folder
|
||||
- Received invitation can be accepted or declined
|
||||
- User avatar indicate in file icon who is the owner of the file
|
||||
- New team heads icon in desktop and mobile toolbar to indicate team members in the team folder
|
||||
|
||||
**Metered Billing**
|
||||
- New metered billing where user can be charged by what he uses.
|
||||
- Bandwidth, storage, flat fee and members are optional features which can be charged, not required
|
||||
- Native balance system from which user is charger at the end of current billing period
|
||||
- User can fund his balance by PayPal and Paystack single payment option
|
||||
- If Stripe payment method is allowed, user can register his credit card and all future payments for billing period will be automatically charged. If there is any credit in balance and is sufficient, then this amount will be preferred instead of credit card charging
|
||||
- User has ability to add/delete his payment methods (only Stripe)
|
||||
- Admin has ability to increase user balance with certain amount
|
||||
- Ability to set registration bonus for every new user registration
|
||||
- User can set billing alert with certain amount. When this amount will be reached, the notification will be sent.
|
||||
- New Usage Estimates widget in user profile which provide price estimates for current billing period
|
||||
- New transactions widget in user profile with usage history
|
||||
|
||||
**Fixed Billing**
|
||||
- Plans with yearly billing period is now supported
|
||||
- New subscription widget with subscription details in user profile
|
||||
- New Payment Method widget to manage user credit cards (available only for Stripe)
|
||||
- New popup component to subscribe or upgrade account plan
|
||||
|
||||
**Notification Center**
|
||||
- Ability to see notifications by Unread and Read category
|
||||
- Interactive notifications to seamlessly perform actions from it if needed
|
||||
- If broadcasting is set, notifications will be received just in time and showed in bottom right corner of the app
|
||||
- Ability to clear all notifications by button
|
||||
|
||||
**Zip**
|
||||
- New on the fly zipping system zips files without additional storage usage
|
||||
- User can now select any files with any folders and zip them together
|
||||
|
||||
**Sharing**
|
||||
- Redesigned sharing popup component for better user experience
|
||||
- Shared video file (.mp4) has now ability to play video in shared page
|
||||
- Ability to get share link via QR code
|
||||
- Ability to generate embeddable code with shared item (beta)
|
||||
- App logo was added into single file share pages
|
||||
|
||||
**File Request**
|
||||
- User can generate file request by opening context menu over single folder or call file request from spotlight
|
||||
- Ability to set custom folder name if file request will be filled
|
||||
- Ability to leave a message for guest
|
||||
- Ability to send file request by email for certain email recipient
|
||||
- Full-fledged reach UI for guests to upload and manage their files directly in file request
|
||||
- Push notification about filled file request will be received for user
|
||||
|
||||
**Folder Upload**
|
||||
- Now user can upload their folders. The same folder structure will be recreated in the app
|
||||
|
||||
**User Settings**
|
||||
- New appearance option was added where user can set his theme mode by dark, light or based by system option
|
||||
- New default emoji option was added where Apple user can switch between native emojis or twemoji
|
||||
- 2fa setup challenge option was added. User can store and generate backup keys.
|
||||
- New Personal Access Token section was added where user can generate access token for API requests.
|
||||
- New 'Current Password' input was added into change password functionality
|
||||
- New widget to track the latest upload and download was added into the Storage tab
|
||||
- Storage usage widget was redesigned
|
||||
- New Billing tab with all subscription related items was added
|
||||
|
||||
**Login & Registration**
|
||||
- Email confirmation for new account registrations can be required
|
||||
- Integrated database with more than 550 disposable temporary email services to automatically deny new account registrations
|
||||
- Users can now set up 2 factor verification with their favourite authenticator app
|
||||
- reCaptcha was added to provide security for your registration and contact form
|
||||
- Social authentication was implemented with Facebook, Google and GitHub drivers.
|
||||
|
||||
**Adsense**
|
||||
- Adsense will be integrated into VueFileManager
|
||||
- The ads are showing in 3 locations - File Viewport, Download Page and Homepage
|
||||
|
||||
**Setup Wizard**
|
||||
- Server check before you running installation, it will show you if you had set up your server correctly
|
||||
- Dark mode support
|
||||
- Now you don't need to set up your subscription system in setup wizard
|
||||
|
||||
**Broadcasting**
|
||||
- Pusher implementation for live communication
|
||||
- Native websocket server as replacement for Pusher (more details soon)
|
||||
- Live notification
|
||||
|
||||
**System**
|
||||
- Database backups on daily basis
|
||||
- After you upload image, additionals thumbnails will be generated to provide you faster browsign experience through your image gallery
|
||||
|
||||
**Admin & Settings**
|
||||
|
||||
**Dashboard**
|
||||
- New widget to track the latest upload and download was added
|
||||
- New widget with the latest transactions was added into extended license version
|
||||
- New earnings widget was added
|
||||
- New alerts will tell you if you are missing plan or you don't have running cron correctly
|
||||
|
||||
**Settings / Server**
|
||||
- Ability to see if cron job is running correctly
|
||||
- Ability to download your server log from admin panel
|
||||
- Ability to see latest 5 database backups
|
||||
- Ability to check if writable permission for exact folders are set correctly
|
||||
- Ability to check if you have correctly set php version and php.ini variables
|
||||
- Ability to see if you have installed all required php extensions
|
||||
|
||||
**Settings / Environment**
|
||||
- Ability to set Broadcasting from admin settings
|
||||
- Ability to set Storage Driver from admin settings
|
||||
- Ability to set Mail Driver from admin settings
|
||||
|
||||
**Settings / Appearance**
|
||||
- Ability to change entire VueFileManager color scheme
|
||||
- Ability to set dark mode logo for main and horizontal logo
|
||||
- Ability to set your own OG Image
|
||||
- Ability to set your own Touch Image
|
||||
|
||||
**Settings / Login & Registration**
|
||||
- New option where you can require email verification was added
|
||||
- New widgets to set up Facebook, Google and GitHub social authentication
|
||||
|
||||
**Settings / Application**
|
||||
- New options to set up reCaptcha
|
||||
|
||||
**Settings / Adsense**
|
||||
- Ability to manage Google Adsense
|
||||
|
||||
**Dev**
|
||||
- PHP 8 support
|
||||
- New DDD design for the backend
|
||||
- Shipped with the latest version of Laravel 9.x
|
||||
- Passport was replaced by Sanctum
|
||||
- New artisan command that expressly installs the entire application
|
||||
- New artisan command that expressly installs the entire application with the demo data
|
||||
- ~80% Of the frontend code was migrated into Tailwind v3. We will continue to reach 100% tailwind friendly
|
||||
|
||||
|
||||
## Version 1.8.3.13
|
||||
#### Release date: 9. December 2021
|
||||
- Fixed issue when visitor can't download files from shared folder with 'Can only view and download' privilege
|
||||
- Fixed issue with sending contact form
|
||||
|
||||
## Version 1.8.3.11-12
|
||||
#### Release date: 7. July 2021
|
||||
- Fixed issue when you tried load folders/files with special characters name
|
||||
|
||||
## Version 1.8.3.10
|
||||
#### Release date: 29. June 2021
|
||||
- Security patch (Critical severity)
|
||||
|
||||
## Version 1.8.3.9
|
||||
#### Release date: 18. June 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed issue when in some cases your server can suffer with increasing RAM usage
|
||||
- Fixed translation issue in some user mobile pages
|
||||
- Mobile navigation fix with hidden back button
|
||||
- Fixed issue where in some case special characters was excerpted from uploaded filename
|
||||
|
||||
## Version 1.8.3.8
|
||||
#### Release date: 15. June 2021
|
||||
- Alibaba Cloud OSS support
|
||||
|
||||
## Version 1.8.3.7
|
||||
#### Release date: 9. June 2021
|
||||
- App name fix in email templates
|
||||
|
||||
## Version 1.8.3.6
|
||||
#### Release date: 7. June 2021
|
||||
- Translation improvements on backend
|
||||
|
||||
## Version 1.8.3.5
|
||||
#### Release date: 24. May 2021
|
||||
- Translation improvements on backend
|
||||
|
||||
## Version 1.8.3.4
|
||||
#### Release date: 15. May 2021
|
||||
- Upload progressbar fix
|
||||
|
||||
## Version 1.8.3.3
|
||||
#### Release date: 10. May 2021
|
||||
- Security update (upgrade required)
|
||||
|
||||
## Version 1.8.3.2
|
||||
#### Release date: 17. April 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed multi select on desktop browser
|
||||
|
||||
## Version 1.8.3.1
|
||||
#### Release date: 18. April 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed previewing files in mobile devices
|
||||
|
||||
## Version 1.8.3
|
||||
#### Release date: 17. April 2021
|
||||
|
||||
**Features:**
|
||||
- Ability to create new language
|
||||
- Ability to set default language for aplication
|
||||
- Ability to show pdf files in VueFileManager
|
||||
|
||||
|
||||
## Version 1.8.2.3
|
||||
#### Release date: 21. March 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed not found page
|
||||
- Fixed admin menu in regular license
|
||||
|
||||
|
||||
## Version 1.8.2.2
|
||||
#### Release date: 12. March 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed file preview in single shared file wasn't showing correctly
|
||||
|
||||
|
||||
## Version 1.8.2.1
|
||||
#### Release date: 25. February 2021
|
||||
|
||||
**Fixes:**
|
||||
- Fixed jumping upload progressbar
|
||||
|
||||
## Version 1.8.2
|
||||
#### Release date: 20. February 2021
|
||||
|
||||
**Folders:**
|
||||
- Ability to change folder icon as Emoji
|
||||
- Ability to change folder icon color from 22 colors set
|
||||
|
||||
**Fixes:**
|
||||
- Added zip folder into mobile folder menu
|
||||
- Removed Autofocus in mobile creating folder
|
||||
|
||||
## Version 1.8.1
|
||||
#### Release date: 7. February 2021
|
||||
|
||||
**Functions:**
|
||||
- Ability to zip and download folder with content within
|
||||
- Ability to send shared folder/file to multiple email recipients
|
||||
- Ability to send share link in existing shared items
|
||||
- Every user has ability to change his timezone in profile settings
|
||||
|
||||
**UI & UX:**
|
||||
- After click on logout if your request is long, you will see processing window
|
||||
- Move/Share/Delete icons is unactive when you don't have selected file in desktop version
|
||||
- Move/Share/Delete icons is hidden in touchable devices
|
||||
- Delete item in contextmenu is now highlighted as red
|
||||
- Hidden scroller in navigation panel on windows
|
||||
- Delete icon for clear text field in rename popup
|
||||
- After opening video, it's start playing automatically
|
||||
- Autofocus and selecting folder name after creating it in desktop version
|
||||
|
||||
**Fixes:**
|
||||
- Max Upload frontend validation fix
|
||||
- In latest uploads files are sorted alwas from newest
|
||||
- Download icon in image/video preview on mobile device and shared folder with read/download privilegies
|
||||
|
||||
**Regular License:**
|
||||
- Included landing page
|
||||
- Included Privacy Policy, Terms of Condition and Cookies policy pages
|
||||
- Included contact form page
|
||||
|
||||
## Version 1.8
|
||||
#### Release date: 21. December 2020
|
||||
|
||||
**User Interface:**
|
||||
|
||||
- Added navigator to shared page with folders when you have multiple folders within for better user experience
|
||||
- New popup to rename your item in desktop & mobile version
|
||||
- Trash moved to Home page under 'Recent Uploads' navigation item
|
||||
- Ability to collapse navigator or favourites widget in File page
|
||||
- Ability to remove uploaded logo and get back to text logo
|
||||
- Ability to cancel uploading via x button
|
||||
- Prevent browser 'Go Back' when you undesirably trying to go to previous page after sign in to your account
|
||||
|
||||
**Sorting**
|
||||
|
||||
- New sorting menu in desktop version buttons panel with multiple actions
|
||||
- New view button with sorting options in mobile version
|
||||
- Ability to sort files & folders in date or alphabetical order
|
||||
|
||||
**Bulk Operations**
|
||||
|
||||
- Select multiple items in desktop version by holding shift key or ctrl/cmd key for increase or decrease selection
|
||||
- New multi select mode in mobile version activated by clicking on 'Select' button below search bar
|
||||
- Ability to select all or deselect all items in mobile version of multi select
|
||||
- Select multiple items and delete them by delete/backspace key
|
||||
- Select multiple items and move them by drag&drop to another folder in view or move them via move option
|
||||
- Ability to move multiple item by dragging them to folder in navigator panel
|
||||
- Ability to set multiple favourite folders by dragging them to favourites group in sidebar panel
|
||||
- Ability to cancel multiple shareing items in 'My Sharing Items' sections via context menu action
|
||||
- New compact UI component for indicate dragging action
|
||||
- Ability to download multiple files from selection as zip
|
||||
- New scrollbar for the Windows users
|
||||
|
||||
**Bug Fixes:**
|
||||
|
||||
- Title name of favourite folder overflowed sidebar when you have long title
|
||||
- Share button in image preview appear when you are in shared public folder
|
||||
- Fixed search indexer overload in high traffic demands scenario
|
||||
- Folder tree in navigator now has correct ordering with folder list in file view
|
||||
|
||||
## Version 1.7.12
|
||||
#### Release date: 16. November 2020
|
||||
|
||||
- Limit maximum upload size on single file
|
||||
|
||||
## Version 1.7.11
|
||||
#### Release date: 24. October 2020
|
||||
|
||||
- Reading exif data and showing them in file info panel
|
||||
- Ability to ban mimetypes. You can find blacklist setup in Settings / Application
|
||||
- Lazy loading for images. If you have hundreds of images in your folder, you will have experience with seamlessly loading.
|
||||
- Fixed bug with context menu overflow in shared page
|
||||
- Fixed button overflow on small mobile screens in popups.
|
||||
|
||||
## Version 1.7.10
|
||||
#### Release date: 31. August 2020
|
||||
|
||||
- Ability to see file in full preview (images, videos[mp4, web, ogv], audios)
|
||||
|
||||
## Version 1.7.9
|
||||
#### Release date: 26. August 2020
|
||||
|
||||
- Ability to set expiration for shared link
|
||||
- If user is logged in, after visit SignIn page will be redirected to files page
|
||||
|
||||
## Version 1.7.8
|
||||
#### Release date: 25. August 2020
|
||||
|
||||
- Ability to read file metadata in shared link for instant messengers
|
||||
|
||||
## Version 1.7.7
|
||||
#### Release date: 24. August 2020
|
||||
|
||||
- Backend pagination for native data
|
||||
- Added clear cache button to app settings
|
||||
- Removed deprecated commands
|
||||
- Code splitting support for Vue router
|
||||
- Added region list to setup wizard
|
||||
- added htaccess to redirect domain root to /public folder
|
||||
- Fixed issue with non VueFileManager created Stripe plans
|
||||
- Fixed email setup in app settings
|
||||
- Additional text logo fix in Sign pages
|
||||
|
||||
## Version 1.7.6
|
||||
#### Release date: 19. August 2020
|
||||
|
||||
- Folder delete fix
|
||||
|
||||
## Version 1.7.5
|
||||
#### Release date: 10. August 2020
|
||||
- Bug fixes and UX enhancement
|
||||
|
||||
|
||||
## Version 1.7.4
|
||||
#### Release date: 5. August 2020
|
||||
- Bug fixes and UX enhancement
|
||||
|
||||
|
||||
## Version 1.7.3
|
||||
#### Release date: 30. July 2020
|
||||
|
||||
- Chunk Upload
|
||||
- Multipart upload support on external storages (Ability to upload bigger files)
|
||||
- Progressbar now show upload in %
|
||||
|
||||
## Version 1.7.2
|
||||
#### Release date: 22. July 2020
|
||||
|
||||
- Readme update
|
||||
- Improvement on Setup Wizard
|
||||
|
||||
## Version 1.7.1
|
||||
#### Release date: 21. July 2020
|
||||
|
||||
- Fixed register button in Regular license
|
||||
|
||||
## Version 1.7
|
||||
#### Release date: 20. July 2020
|
||||
|
||||
**Software as a Service**
|
||||
|
||||
- Ability to create monthly subscription plans with storage space
|
||||
- Ability to charge customers for storage space with Stripe payment service
|
||||
- List all of your customer invoices
|
||||
- Included Legal pages (Terms of Service, Privacy Policy, Cookie Policy)
|
||||
- Included Cookie disclaimer in SaaS version
|
||||
- Landing page for present your service solution
|
||||
|
||||
**Settings - Application**
|
||||
|
||||
- Storage limitation option
|
||||
- Default storage space for new accounts option
|
||||
- Allow user registration option
|
||||
- Set your contact email for message form in landing page
|
||||
- Set your google analytics code to track visitors
|
||||
|
||||
**Settings - Appearance**
|
||||
|
||||
- App title option
|
||||
- App description option
|
||||
- Change your logo and favicon option
|
||||
|
||||
**Settings - Billing**
|
||||
|
||||
- Set your company name and VAT number options in SaaS version
|
||||
- Set your billing country adress. options in SaaS version
|
||||
|
||||
**Settings - Payments**
|
||||
|
||||
- Allow subscription payments option
|
||||
- Get your stripe webhook link option
|
||||
|
||||
**Settings - Homepage**
|
||||
|
||||
- Ability to change content, show/hide sections for Landing page presentation
|
||||
|
||||
**Settings - Email**
|
||||
|
||||
- Ability to set your email credentials from admin panel
|
||||
|
||||
**Admin - Users**
|
||||
|
||||
- Subscription plan details
|
||||
- List of all user invoices
|
||||
|
||||
**Dashboard**
|
||||
|
||||
- Showed widget with your total users
|
||||
- Showed widget with total space usage
|
||||
- Showed widget with total premium users
|
||||
- Showed widget with latest registrations
|
||||
- Showed latest VueFileManager version
|
||||
- Showed license type (Extend/Regular)
|
||||
|
||||
**User**
|
||||
|
||||
- Added billing information to profile settings in Saas Version
|
||||
- Added subscription plan page to get information about current subscription. Ability to cancel or renew subscription
|
||||
- Added payment card page with ability to list all registered card, add new credit card, remove card or set selected card as default payment.
|
||||
- Added invoices page where are listed all invoices
|
||||
- Added invoice page detail with ability to print invoice with
|
||||
|
||||
**VueFileManager design**
|
||||
|
||||
- Circle notice icon in avatar in case of incomplete payment or required action to upgrade storage capacity
|
||||
|
||||
**Setup Wizard**
|
||||
|
||||
- The UI for Install and configure your VueFIlemanager
|
||||
- Purchase code verification
|
||||
- Database credentials setup
|
||||
- Ability to setup Stripe for Extended License (Set Credentials, set billing informations and create subscription plans)
|
||||
- Storage Setup
|
||||
- Email credentials setup
|
||||
- General settings setup
|
||||
- Admin setup
|
||||
|
||||
**Storage**
|
||||
|
||||
- Added support for Object Cloud Storage by Wasabi
|
||||
- Added support for Backblaze B2 Cloud Storage
|
||||
Fixes
|
||||
- Fixed issue when you move parent directory to it’s children directory, then your folder disappear.
|
||||
- Fixed issue which appear on specifical hosting configuration when you can’t load shared folder content.
|
||||
|
||||
**Others**
|
||||
|
||||
- Improved form design
|
||||
- Profile settings get sidebar panel navigation
|
||||
- Improved design for important notices
|
||||
- Updated i18n language files
|
||||
- Added agreement in registration page for SaaS version
|
||||
- Upgraded laravel framework from 6 to 7 version
|
||||
|
||||
**Upgrading**
|
||||
|
||||
- All upgrading backend operations is running on background after putting new source code to app directory (Don't forget create backup of your database and storage before make any changes in your production application)
|
||||
- UI page for additional options when it’s neccesarily
|
||||
- Upgrading To 1.7 From 1.6.x or newest
|
||||
|
||||
## Version 1.6.4
|
||||
#### Release date: 9. June 2020
|
||||
|
||||
- Fileview xscroller fix
|
||||
|
||||
## Version 1.6.3
|
||||
#### Release date: 5. June 2020
|
||||
|
||||
- Fixed svg upload
|
||||
- Fixed scrolling in main file view
|
||||
|
||||
## Version 1.6.2
|
||||
#### Release date: 31. May 2020
|
||||
|
||||
- Fixed popups on mobile version
|
||||
|
||||
## Version 1.6.1
|
||||
#### Release date: 31. May 2020
|
||||
|
||||
- Fixed npm building crash on web server
|
||||
|
||||
## Version 1.6
|
||||
#### Release date: 28. May 2020
|
||||
|
||||
**User Management**
|
||||
|
||||
- List of all registered users
|
||||
- Ability to create new user
|
||||
- Change user role (Admin or User)
|
||||
- Change user storage capacity in GBs
|
||||
- User storage capacity usage preview
|
||||
- Send email to user for password reset
|
||||
- Ability to delete user with all user data and stored files
|
||||
Others
|
||||
- Redesigned User profile settings
|
||||
- Small bug fixes
|
||||
- New artisan command for upgrade app (for more info check upgrade guide)
|
||||
- Upgrading To 1.6 From 1.4.2 or newest
|
||||
|
||||
## Version 1.5.2
|
||||
#### Release date: 22. May 2020
|
||||
|
||||
- Empty page fix
|
||||
- Log out in mobile fix
|
||||
- Dark mode fixes
|
||||
- Password reset bug fixes
|
||||
|
||||
## Version 1.5
|
||||
#### Release date: 19. May 2020
|
||||
|
||||
**UI & UX**
|
||||
|
||||
- New navigation menu with Home, Shared, Trash, Settings locations in desktop
|
||||
- New dynamic sidebar with folder tree navigation, file categories and tools
|
||||
- Folder tree navigator in main file page
|
||||
- Added Participant uploads category to shared page
|
||||
- Added recent uploads category to file page
|
||||
- New settings page with separated Profile, Password and Storage
|
||||
- Updated colors for dark mode
|
||||
- Improvement desgin across all components
|
||||
- Added (X) close button to all popups
|
||||
- Added editing icons (move, share) to main bar
|
||||
- More transparent context menus with action groups
|
||||
Mobile
|
||||
- New main navigation menu
|
||||
- Added item thumbnails to mobile contextmenu
|
||||
Others
|
||||
- Public shared image now open in an original image page
|
||||
- New page with storage usage details
|
||||
|
||||
## Version 1.4.2
|
||||
#### Release date: 6. May 2020
|
||||
|
||||
**External Storage Services**
|
||||
|
||||
- Amazon Web Services S3 support
|
||||
- Digital Ocean Spaces support
|
||||
- Updated documentation
|
||||
- New blog with some handy tips and news about VueFileManager
|
||||
|
||||
## Version 1.4.1
|
||||
#### Release date: 4. May 2020
|
||||
|
||||
**Translations**
|
||||
|
||||
- Added Chinese (Simplified) language (thanks haimang to contribute)
|
||||
Bugs
|
||||
- Go to profile in mobile version
|
||||
- Internal front-end bug
|
||||
Error logs
|
||||
- Added when passport client isn’t set up correctly
|
||||
- Added when database connection isn’t available
|
||||
|
||||
**Others**
|
||||
|
||||
- Updated terminal info when you are running php artisan setup:prod
|
||||
- Updated documentation with more describing installation process
|
||||
|
||||
## Version 1.4
|
||||
#### Release date: 1. May 2020
|
||||
|
||||
**Sharing**
|
||||
|
||||
- Share your folders and files
|
||||
- Added sidebar group with shared items
|
||||
- Added UI icons to item preview to look which item is shared and which item was uploaded by participant
|
||||
|
||||
**Folders**
|
||||
|
||||
- User can share folder content
|
||||
- User can protect folder content by password
|
||||
- User can set permission to interact with shared folder - only view and download or view, download, upload, rename, delete and move items
|
||||
|
||||
**Files**
|
||||
|
||||
- User can share single file
|
||||
- User can protect single file by password
|
||||
|
||||
**Others**
|
||||
|
||||
- Small UI improvements
|
||||
- Bug fixes
|
||||
- Upgrading to 1.4 from 1.3.x
|
||||
|
||||
## Version 1.3.1
|
||||
#### Release date: 8. April 2020
|
||||
|
||||
- Bug fixes
|
||||
- Upgrading to 1.3.1 from 1.2
|
||||
|
||||
## Version 1.3
|
||||
#### Release date: 3. April 2020
|
||||
|
||||
- i18n localization support
|
||||
- Added SK, EN language files
|
||||
- Video/Audio preview in file preview panel (Thanks to Joshua Fouyon to participating on this feature)
|
||||
- Drop uploading (You can now drag files from desktop and drop it to VueFileManager)
|
||||
- Fixed bug when rename item in safari browser
|
||||
- Fixed bug when you drag folder from trash to favourites in sidebar panel
|
||||
- small functions and design improvements
|
||||
- Upgrading to 1.3 from 1.2
|
||||
|
||||
## Version 1.2
|
||||
#### Release date: 29. March 2020
|
||||
|
||||
- Move your items by folder tree
|
||||
- Fixed bug with image rotation on iOS Device
|
||||
- Improved animations
|
||||
- Small design changes
|
||||
- iOS web app capable support
|
||||
|
||||
## Version 1.1.1
|
||||
#### Release date: 17. March 2020
|
||||
|
||||
- Bug fixes
|
||||
|
||||
## Version 1.1
|
||||
#### Release date: 15. March 2020
|
||||
|
||||
**User Authentication**
|
||||
|
||||
- Login to user account
|
||||
- Register new user account
|
||||
- Reset user password
|
||||
|
||||
**Functionality**
|
||||
|
||||
- Added locations to menu
|
||||
- Added trash for deleted folders & files
|
||||
- Restore files or folders from trash
|
||||
- Empty trash function
|
||||
- Favourites folders
|
||||
- List of 5 latest uploads
|
||||
- Profile settings page
|
||||
- Storage info and upload limits
|
||||
|
||||
**Design**
|
||||
|
||||
- Night Mode
|
||||
- Navigation sidebar
|
||||
- Quick action buttons in mobile version
|
||||
- Improved mobile UX
|
||||
- Other small design improvements
|
||||
|
||||
**Settings**
|
||||
|
||||
- Enable/Disable user account registration
|
||||
- Set storage limitation
|
||||
- Set storage capacity for all users
|
||||
|
||||
## Version 1
|
||||
#### Release date: 25. February 2020
|
||||
- Official release
|
||||
313
codecanyon.html
Normal file
313
codecanyon.html
Normal file
@@ -0,0 +1,313 @@
|
||||
<h3>VueFileManager Mobile Browser Screenshots</h3>
|
||||
<img src="https://i.ibb.co/g3r3H49/mobile-files.jpg" alt="Files">
|
||||
<img src="https://i.ibb.co/4Mb7dCN/mobile-teams.jpg" alt="Teams">
|
||||
<img src="https://i.ibb.co/MCB5wjY/mobile-file-popups.jpg" alt="Popups">
|
||||
<img src="https://i.ibb.co/NCQ5RKL/mobile-user-profile.jpg" alt="User Profile">
|
||||
<img src="https://i.ibb.co/8PSJt51/mobile-administration-panel.jpg" alt="App Settings">
|
||||
<img src="https://i.ibb.co/d5kY6cs/mobile-spotlight.jpg" alt="Spotlight">
|
||||
|
||||
<h3>Core Functionalities</h3>
|
||||
<h5><strong>Meticulously Designed User Interface & User Experience</strong></h5>
|
||||
<p>
|
||||
In last 2 years of VueFileManager evolution with help of our users, we spend a lot of time designing gorgeous
|
||||
looking user interface and seamless user experience with our file management frontend. We advocate simplicity and
|
||||
usability.
|
||||
</p>
|
||||
|
||||
<h5><strong>Responsive</strong></h5>
|
||||
<p>
|
||||
Meticulously optimized mobile version of VueFileManager, we just love how nice and easy are all components working.
|
||||
Mobile responsive version should be nice and usable as his bigger desktop brother.
|
||||
</p>
|
||||
|
||||
<h5><strong>Metered Billing System - SaaS (Extended License Required)</strong></h5>
|
||||
<p>
|
||||
Metered billing works like ‘Pay as You Go’. You can charge your users by their usage, how many Gigabytes of data
|
||||
they have stored, how many Gigabytes of data they transfer or just you can set up your fixed flat fee.
|
||||
</p>
|
||||
|
||||
<h5><strong>Offline Payments - SaaS (Extended License Required)</strong></h5>
|
||||
<p>
|
||||
With a metered billing system, users don't need to own and have registered credit cards. VueFileManager has its own
|
||||
credit system where users can increase deposit with a single-payment charge. This charge can be processed By PayPal,
|
||||
Stripe or Paystack provided payment methods - for example Apple Pay, Google Pay, Bank Account, USSD, Mobile Money,
|
||||
EFT, QR Code, PayPal credit and many more.
|
||||
</p>
|
||||
<p>
|
||||
Also, you as an admin can give a bonus in a certain value for every new registration, or send an existing bonus for
|
||||
a user in a certain value. Users with a metered billing system can set their Billing alert with a certain value. All
|
||||
metered subscriptions are settled every 30 days.
|
||||
</p>
|
||||
<p>With Stripe enabled, users can register their credit to charge any payments automatically.</p>
|
||||
|
||||
<h5><strong>Fixed Billing System - SaaS (Extended License Required)</strong></h5>
|
||||
<p>
|
||||
With fixed billing you can set your billing plans in monthly or yearly periods. You can set a limit for max storage
|
||||
disk size or max number of team members.
|
||||
</p>
|
||||
|
||||
<h5><strong>No-SaaS in Default</strong></h5>
|
||||
<p>
|
||||
If you don’t want to run your business with a storage cloud but just using VueFileManager as your own file storage
|
||||
client, you can use the app without all billing functions as well. See our basic demo without subscription module.
|
||||
</p>
|
||||
|
||||
<h5><strong>Upload Files</strong></h5>
|
||||
<p>
|
||||
With VueFileManager you can upload files up to tens of gigabytes, don’t worry that your big files won't be uploaded.
|
||||
We support chunk upload and multipart uploads for your s3 storage service. All work seamlessly.
|
||||
</p>
|
||||
|
||||
<h5><strong>Folder Upload</strong></h5>
|
||||
<p>
|
||||
For VueFileManager it isn't any problem to upload a folder with your files. The same folder structure will be
|
||||
recreated in the app.
|
||||
</p>
|
||||
|
||||
<h5><strong>Sharing Files</strong></h5>
|
||||
<p>
|
||||
With our reach sharing functionalities, you can easily just click on your file or folder, and generate a shared link
|
||||
for everyone. Also you can protect your shared files with your password.
|
||||
</p>
|
||||
<p>
|
||||
Use expiration functionality to automatically expire links, share links directly via email or generate QR code and
|
||||
share it with guys on your left.
|
||||
</p>
|
||||
|
||||
<h5><strong>Shared Pages</strong></h5>
|
||||
<p>
|
||||
If you share any folder with files within, the user has the same user experience as a logged user. He can create
|
||||
folders, name it, upload files or move them into other folders directly in your shared folder.
|
||||
</p>
|
||||
<p>
|
||||
Videos have their own dedicated shared page with your app logo and ability to play video directly in this page with
|
||||
the download button above, try it, it’s magic!
|
||||
</p>
|
||||
|
||||
<h5><strong>File Request</strong></h5>
|
||||
<p>
|
||||
Do you need a lot of files? Just generate a file request, and send your link for this person. The person can use it
|
||||
to upload files directly into your folder or into your home section for files. The user who’s uploading files has
|
||||
the same user experience as the internal account.
|
||||
</p>
|
||||
|
||||
<h5><strong>Teams</strong></h5>
|
||||
<p>
|
||||
Invite your colleagues or family into your team folders, set their permissions and collaborate together seamlessly.
|
||||
</p>
|
||||
|
||||
<h5><strong>Spotlight</strong></h5>
|
||||
<p>
|
||||
With the spotlight, you can search for your users, files, folders, navigate throughout the app, toggle dark mode,
|
||||
toggle emojis and many more from any location in the app. It’s like magic. Good suit for super users.
|
||||
</p>
|
||||
|
||||
<h5><strong>Notification Center</strong></h5>
|
||||
<p>
|
||||
All important events that occur in your account will be recorded in your notifications center. For example, a new
|
||||
team invite, file request was filled, bonus received, billing alert was reached and many more.
|
||||
</p>
|
||||
|
||||
<h5><strong>External Storage Services</strong></h5>
|
||||
<p>
|
||||
You can use it as main storage for all your files external storage service. We support all S3 compatible services
|
||||
like Amazon Web Services S3, Spaces from Digital Ocean, Backblaze, Wasabi, Alibaba Cloud OSS, Storj and many more.
|
||||
</p>
|
||||
|
||||
<h5><strong>Decentralized Storage Service</strong></h5>
|
||||
<p>
|
||||
With Storj DCS (Decentralized Cloud Storage) files aren’t stored in centralized data centers — instead, they're
|
||||
encrypted, split into pieces, and distributed on a global cloud network.
|
||||
</p>
|
||||
|
||||
<h5><strong>Full-Fledged API</strong></h5>
|
||||
<p>
|
||||
You can integrate VueFileManager into your app seamlessly. Users can generate authentication tokens in their profile
|
||||
settings. Documentation for API coming soon.
|
||||
</p>
|
||||
|
||||
<h5><strong>2-Factor Verification</strong></h5>
|
||||
<p>
|
||||
Another layer of security to make sure your files are secured. Users can set up 2 factor verification with their
|
||||
favourite authenticator app.
|
||||
</p>
|
||||
|
||||
<h5><strong>Social Logins</strong></h5>
|
||||
<p>
|
||||
Log into your app with your social account. Currently we support Facebook, Github and Google providers. More is
|
||||
coming soon.
|
||||
</p>
|
||||
|
||||
<h5><strong>Customizable Folder Icons</strong></h5>
|
||||
<p>
|
||||
Set your favourite emoji to your folder as an icon and make VueFileManager more personal for you! If you are an
|
||||
apple user, you can switch between Apple emojis and Tweemojis from twitter.
|
||||
</p>
|
||||
|
||||
<h5><strong>Admin Panel</strong></h5>
|
||||
<p>
|
||||
As admin, you have full control over the entire app, you can create or delete users, manage their storage size, disable registration, require email verification, set upload limits and many more.
|
||||
</p>
|
||||
|
||||
<h5><strong>Dark Mode</strong></h5>
|
||||
<p>
|
||||
We support dark mode natively. Users can set dark mode via application, or let Dark/Light mode handle with preferred
|
||||
OS settings.
|
||||
</p>
|
||||
|
||||
<h5><strong>Language Editor</strong></h5>
|
||||
<p>
|
||||
With our language editor you can translate applications into your home language. It’s at your hand in the admin
|
||||
panel.
|
||||
</p>
|
||||
|
||||
<h5><strong>Auto Database Backup</strong></h5>
|
||||
<p>
|
||||
VueFileManager will take care of your daily database backups. When an unexpected event occurs, your database backup
|
||||
will be ready for you.
|
||||
</p>
|
||||
|
||||
<h5><strong>reCaptcha</strong></h5>
|
||||
<p>
|
||||
reCaptcha will provide security for registration and contact form from internet bots and prevent spammers from
|
||||
abusing your application.
|
||||
</p>
|
||||
|
||||
<h5><strong>Blacklist with more than 550+ Temporary Email Services</strong></h5>
|
||||
<p>
|
||||
We integrated a database with more than 550 disposable temporary email services to deny new account registrations
|
||||
with abusive behavior.
|
||||
</p>
|
||||
|
||||
<h5><strong>AdSense</strong></h5>
|
||||
<p>
|
||||
Monetize your file cloud with Google Adsense service. We natively implement 3 ad slots into the VueFileManager
|
||||
frontend.
|
||||
</p>
|
||||
|
||||
<h5><strong>Server Status</strong></h5>
|
||||
<p>
|
||||
You can check the admin panel server status. You can download your server logs for support communication, check your
|
||||
latest database backups, check if your cron is running smoothly or if you have correctly set up your PHP with all
|
||||
required php extensions.
|
||||
</p>
|
||||
|
||||
<h5><strong>Easy Installation with Setup Wizard</strong></h5>
|
||||
<p>
|
||||
Setup Wizard is a convenient way to set up and configure your VueFileManager app in a few steps. Before you run your
|
||||
installation, Setup Wizard will check all your server components and let you know, when you are missing something.
|
||||
</p>
|
||||
|
||||
<h5><strong>Drag & Drop</strong></h5>
|
||||
<p>You can drag your files or folder to another folder seamlessly</p>
|
||||
|
||||
<h5><strong>Source Code</strong></h5>
|
||||
<p>
|
||||
All source files of VueFileManager are included in download. You can easily inspect code and build your own
|
||||
functionality.
|
||||
</p>
|
||||
|
||||
<h3>Technologies</h3>
|
||||
<ul>
|
||||
<li>Laravel 9.x</li>
|
||||
<li>Vue 2.6.x</li>
|
||||
<li>Tailwind 3</li>
|
||||
</ul>
|
||||
|
||||
<h3>Server Requirements</h3>
|
||||
<ul>
|
||||
<li>PHP >= 8.0.2 version (8.1+ recommended)</li>
|
||||
<li>MySQL 5.6+</li>
|
||||
<li>Nginx or Apache</li>
|
||||
</ul>
|
||||
|
||||
<h3>Useful Links</h3>
|
||||
<p>
|
||||
<a href="https://gist.github.com/MakingCG/a702a112be63bc6f0032dd55522327cf">
|
||||
<strong>Installation Guide</strong>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://gist.github.com/MakingCG/9c07f8af392081ae5d5290d920a79b5d">
|
||||
<strong>Changelog</strong>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3>Tips</h3>
|
||||
<p>
|
||||
<a
|
||||
href="https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-laravel-application-on-vps-with-debian-10-64676a3ff4d7"
|
||||
>
|
||||
<strong>How to install VueFileManager on VPS with Debian 10</strong>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a
|
||||
href="https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-with-aws-s3-as-an-external-storage-a2c525aec698"
|
||||
>
|
||||
<strong>How to Set Up AWS S3</strong>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a
|
||||
href="https://medium.com/vuefilemanager/how-to-set-up-vuefilemanager-with-digital-ocean-spaces-as-a-external-storage-6cccf590c23d"
|
||||
>
|
||||
<strong>How to Set Up Digital Ocean Spaces</strong>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3>Demos</h3>
|
||||
|
||||
<h5>
|
||||
<strong>
|
||||
<a href="https://demo-metered.vuefilemanager.com/sign-in"> Metered Billing </a>
|
||||
</strong>
|
||||
</h5>
|
||||
<p>
|
||||
Browse demo with the Pay as You Go model. You can try credit system, fund your account balance and see how usage
|
||||
estimates works. Some functions for default howdy account are restricted. Feel free to create your own account with
|
||||
1 GB upload limit.
|
||||
</p>
|
||||
|
||||
<h5>
|
||||
<strong>
|
||||
<a href="https://demo-fixed.vuefilemanager.com/sign-in"> Fixed Billing </a>
|
||||
</strong>
|
||||
</h5>
|
||||
<p>
|
||||
Browse demo with the Fixed model. You can try subscribe to any billing plan available in the app. Some functions for
|
||||
default howdy account are restricted. Feel free to create your own account with 1 GB upload limit.
|
||||
</p>
|
||||
|
||||
<h5>
|
||||
<strong>
|
||||
<a href="https://demo-regular.vuefilemanager.com/sign-in"> Regular without Subscription Module </a>
|
||||
</strong>
|
||||
</h5>
|
||||
<p>
|
||||
Browse demo without the subscription system. This demo with suit for regular license. Some functions for default
|
||||
howdy account are restricted. Feel free to create your own account with 1 GB upload limit.
|
||||
</p>
|
||||
|
||||
<h3>Frequently asked</h3>
|
||||
|
||||
<h5><strong>Is there any future plan for the mobile app?</strong></h5>
|
||||
<p>
|
||||
Yes, partially, but it depends on how VueFileManager sales will perform. We have to earn some money for mobile
|
||||
development. If it goes well, then we can start work on mobile development. So please buy some more licenses to
|
||||
support further development. Thank you, you are the best!
|
||||
</p>
|
||||
|
||||
<h5><strong>Do you have any future plans to integrate FTP upload?</strong></h5>
|
||||
<p>We don’t have any plan to support FTP uploading, it’s out of scope.</p>
|
||||
<p>
|
||||
When you upload file via app, the app must process the file, create database record, attach it to the owner of the
|
||||
file, move file to storage directory where are stored other user files and any other related functions must run,
|
||||
this can’t be done when user upload file via ftp. This will need to build another software for the server part, but
|
||||
this does not pay off in terms of development costs and benefits for our focused users.
|
||||
</p>
|
||||
<p>
|
||||
But, you can upload files without trouble in any size via VueFileManager, we support chunk upload in browser and
|
||||
multipart upload for your s3 storage disk to manage big files. With this you are able to upload files in the tens of
|
||||
gigabytes.
|
||||
</p>
|
||||
@@ -8,42 +8,59 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"php": "^8.0.2",
|
||||
"ext-json": "*",
|
||||
"brianium/paratest": "^6.2",
|
||||
"cartalyst/stripe-laravel": "^13.1",
|
||||
"doctrine/dbal": "^2.12.1",
|
||||
"fideloper/proxy": "^4.4.1",
|
||||
"fruitcake/laravel-cors": "^2.0.3",
|
||||
"ext-pdo": "*",
|
||||
"beyondcode/laravel-websockets": "^1.13",
|
||||
"brianium/paratest": "^6.4.1",
|
||||
"cocur/slugify": "^4.1",
|
||||
"doctrine/dbal": "^2.13.7",
|
||||
"fruitcake/laravel-cors": "^2.0.5",
|
||||
"gabrielelana/byte-units": "^0.5.0",
|
||||
"guzzlehttp/guzzle": "^7.2.0",
|
||||
"intervention/image": "^2.5.1",
|
||||
"guzzlehttp/guzzle": "^7.4.1",
|
||||
"intervention/image": "^2.7.1",
|
||||
"jaybizzle/laravel-crawler-detect": "^1.2",
|
||||
"kyslik/column-sortable": "^6.4",
|
||||
"laravel/cashier": "^12.9.1",
|
||||
"laravel/fortify": "^1.7.7",
|
||||
"laravel/framework": "^8.30.1",
|
||||
"laravel/sanctum": "^2.9",
|
||||
"laravel/tinker": "^2.6.1",
|
||||
"laravel/ui": "^3.2.0",
|
||||
"league/flysystem-aws-s3-v3": "^1.0.29",
|
||||
"league/flysystem-cached-adapter": "^1.1.0",
|
||||
"madnest/madzipper": "^1.1.0",
|
||||
"spatie/laravel-backup": "^6.15",
|
||||
"spatie/laravel-tail": "^4.3",
|
||||
"teamtnt/laravel-scout-tntsearch-driver": "^11.1.0",
|
||||
"vimeo/psalm": "^4.7"
|
||||
"kyslik/column-sortable": "^6.4.1",
|
||||
"laravel/fortify": "^1.12.0",
|
||||
"laravel/framework": "^9.2",
|
||||
"laravel/sanctum": "^2.14.2",
|
||||
"laravel/socialite": "^5.5.1",
|
||||
"laravel/tinker": "^2.7",
|
||||
"laravel/ui": "^3.4.2",
|
||||
"league/flysystem-aws-s3-v3": "^3.0.9",
|
||||
"league/flysystem-ftp": "^3.0",
|
||||
"makingcg/saas-billing": "^1.0",
|
||||
"matthewbdaly/laravel-azure-storage": "^2.0",
|
||||
"pusher/pusher-php-server": "^7.0",
|
||||
"spatie/data-transfer-object": "^3.7.3",
|
||||
"spatie/laravel-backup": "^8.0.8",
|
||||
"spatie/laravel-query-builder": "^5.0.0",
|
||||
"spatie/laravel-queueable-action": "^2.13.1",
|
||||
"spatie/laravel-tail": "^4.4.0",
|
||||
"stechstudio/laravel-zipstream": "^4.5",
|
||||
"symfony/http-client": "^6.0",
|
||||
"symfony/mailgun-mailer": "^6.0",
|
||||
"symfony/postmark-mailer": "^6.0",
|
||||
"teamtnt/laravel-scout-tntsearch-driver": "^11.6",
|
||||
"vimeo/psalm": "^4.19.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"barryvdh/laravel-ide-helper": "^2.9",
|
||||
"facade/ignition": "^2.5.14",
|
||||
"fakerphp/faker": "^1.14.1",
|
||||
"mockery/mockery": "^1.4.3",
|
||||
"nunomaduro/collision": "^5.3.0",
|
||||
"phpunit/phpunit": "^9.5.2"
|
||||
"barryvdh/laravel-ide-helper": "^2.12.1",
|
||||
"friendsofphp/php-cs-fixer": "^3.5.0",
|
||||
"spatie/laravel-ignition": "^1.0",
|
||||
"nunomaduro/larastan": "^0.7.15",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"phpunit/phpunit": "^9.5.16",
|
||||
"mockery/mockery": "^1.5.0",
|
||||
"fakerphp/faker": "^1.19.0",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"repositories":[
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/makingcg/saas-billing.git"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
@@ -56,7 +73,9 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"App\\" : "src/App/",
|
||||
"Domain\\" : "src/Domain/",
|
||||
"Support\\" : "src/Support/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
},
|
||||
@@ -65,7 +84,8 @@
|
||||
"database/factories"
|
||||
],
|
||||
"files": [
|
||||
"app/Http/helpers.php"
|
||||
"src/Support/errors.php",
|
||||
"src/Support/helpers.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
@@ -86,7 +106,6 @@
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi"
|
||||
],
|
||||
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
|
||||
"psalm": "vendor/bin/psalm"
|
||||
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
|
||||
}
|
||||
}
|
||||
|
||||
9003
composer.lock
generated
9003
composer.lock
generated
File diff suppressed because it is too large
Load Diff
102
config/app.php
102
config/app.php
@@ -161,8 +161,8 @@ return [
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
|
||||
Laravel\Socialite\SocialiteServiceProvider::class,
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
Madnest\Madzipper\MadzipperServiceProvider::class,
|
||||
App\Providers\FortifyServiceProvider::class,
|
||||
|
||||
/*
|
||||
@@ -174,7 +174,7 @@ return [
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
],
|
||||
@@ -191,74 +191,64 @@ return [
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'Stripe' => Cartalyst\Stripe\Laravel\Facades\Stripe::class,
|
||||
'Crawler' => Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect::class,
|
||||
//'Madzipper' => Madnest\Madzipper\Madzipper::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'Stripe' => Cartalyst\Stripe\Laravel\Facades\Stripe::class,
|
||||
'Crawler' => Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect::class,
|
||||
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
|
||||
],
|
||||
|
||||
'deploy_secret' => env('APP_DEPLOY_SECRET'),
|
||||
'deploy_branch' => env('APP_DEPLOY_BRANCH'),
|
||||
|
||||
'debug_blacklist' => [
|
||||
'_ENV' => [
|
||||
'_ENV' => [
|
||||
'APP_KEY',
|
||||
|
||||
'DB_USERNAME',
|
||||
'DB_PASSWORD',
|
||||
'REDIS_PASSWORD',
|
||||
'MAIL_PASSWORD',
|
||||
|
||||
'PUSHER_APP_KEY',
|
||||
'PUSHER_APP_SECRET',
|
||||
|
||||
'PASSPORT_CLIENT_ID',
|
||||
'PASSPORT_CLIENT_SECRET',
|
||||
|
||||
'AWS_SECRET_ACCESS_KEY',
|
||||
'AWS_ACCESS_KEY_ID',
|
||||
|
||||
'S3_SECRET_ACCESS_KEY',
|
||||
'S3_ACCESS_KEY_ID',
|
||||
'DO_SPACES_KEY',
|
||||
'DO_SPACES_SECRET',
|
||||
|
||||
'WASABI_KEY',
|
||||
'WASABI_SECRET',
|
||||
|
||||
'BACKBLAZE_KEY',
|
||||
'BACKBLAZE_SECRET',
|
||||
],
|
||||
@@ -276,8 +266,8 @@ return [
|
||||
'PASSPORT_CLIENT_ID',
|
||||
'PASSPORT_CLIENT_SECRET',
|
||||
|
||||
'AWS_SECRET_ACCESS_KEY',
|
||||
'AWS_ACCESS_KEY_ID',
|
||||
'S3_SECRET_ACCESS_KEY',
|
||||
'S3_ACCESS_KEY_ID',
|
||||
|
||||
'DO_SPACES_KEY',
|
||||
'DO_SPACES_SECRET',
|
||||
@@ -288,7 +278,7 @@ return [
|
||||
'BACKBLAZE_KEY',
|
||||
'BACKBLAZE_SECRET',
|
||||
],
|
||||
'_POST' => [
|
||||
'_POST' => [
|
||||
'password',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -13,7 +13,7 @@ return [
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
|
||||
@@ -36,14 +36,14 @@ return [
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
'hash' => false,
|
||||
'hash' => false,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -67,7 +67,7 @@ return [
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
'model' => App\Users\Models\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
@@ -94,8 +94,8 @@ return [
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -111,7 +111,7 @@ return [
|
||||
* The disk names on which the backups will be stored.
|
||||
*/
|
||||
'disks' => [
|
||||
env('FILESYSTEM_DRIVER', 'local'),
|
||||
env('FILESYSTEM_DISK', 'local'),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -145,12 +145,12 @@ return [
|
||||
*/
|
||||
'notifications' => [
|
||||
'notifications' => [
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailedNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFoundNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailedNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFoundNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessfulNotification::class => ['mail'],
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -159,26 +159,13 @@ return [
|
||||
*/
|
||||
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
|
||||
|
||||
/*'mail' => [
|
||||
'to' => 'your@example.com',
|
||||
'mail' => [
|
||||
'to' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
],*/
|
||||
|
||||
'slack' => [
|
||||
'webhook_url' => '',
|
||||
|
||||
/*
|
||||
* If this is set to null the default channel of the webhook will be used.
|
||||
*/
|
||||
'channel' => null,
|
||||
|
||||
'username' => null,
|
||||
|
||||
'icon' => null,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -189,10 +176,12 @@ return [
|
||||
*/
|
||||
'monitor_backups' => [
|
||||
[
|
||||
'name' => env('APP_NAME', 'laravel-backup'),
|
||||
'disks' => ['local'],
|
||||
'name' => env('APP_NAME', 'vuefilemanager-backup'),
|
||||
'disks' => [
|
||||
env('FILESYSTEM_DISK', 'local'),
|
||||
],
|
||||
'health_checks' => [
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -29,18 +29,21 @@ return [
|
||||
|
||||
'connections' => [
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'useTLS' => true,
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'encrypted' => true,
|
||||
'host' => env('PUSHER_APP_HOST'),
|
||||
'port' => env('PUSHER_APP_PORT'),
|
||||
'scheme' => env('PUSHER_APP_TLS', true) ? 'https' : 'http',
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
|
||||
@@ -40,20 +40,20 @@ return [
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
@@ -62,24 +62,24 @@ return [
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('S3_ACCESS_KEY_ID'),
|
||||
'secret' => env('S3_SECRET_ACCESS_KEY'),
|
||||
'region' => env('S3_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stripe Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Stripe publishable key and secret key give you access to Stripe's
|
||||
| API. The "publishable" key is typically used when interacting with
|
||||
| Stripe.js while the "secret" key accesses private API endpoints.
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('STRIPE_KEY'),
|
||||
|
||||
'secret' => env('STRIPE_SECRET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cashier Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the base URI path where Cashier's views, such as the payment
|
||||
| verification screen, will be available from. You're free to tweak
|
||||
| this path according to your preferences and application design.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => env('CASHIER_PATH', 'stripe'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stripe Webhooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Your Stripe webhook secret is used to prevent unauthorized requests to
|
||||
| your Stripe webhook handling controllers. The tolerance setting will
|
||||
| check the drift between the current time and the signed request's.
|
||||
|
|
||||
*/
|
||||
|
||||
'webhook' => [
|
||||
'secret' => env('STRIPE_WEBHOOK_SECRET'),
|
||||
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cashier Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the model in your application that implements the Billable trait
|
||||
| provided by Cashier. It will serve as the primary model you use while
|
||||
| interacting with Cashier related methods, subscriptions, and so on.
|
||||
|
|
||||
*/
|
||||
|
||||
'model' => env('CASHIER_MODEL', App\Models\User::class),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Currency
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the default currency that will be used when generating charges
|
||||
| from your application. Of course, you are welcome to use any of the
|
||||
| various world currencies that are currently supported via Stripe.
|
||||
|
|
||||
*/
|
||||
|
||||
'currency' => env('CASHIER_CURRENCY', 'usd'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Currency Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the default locale in which your money values are formatted in
|
||||
| for display. To utilize other locales besides the default en locale
|
||||
| verify you have the "intl" PHP extension installed on the system.
|
||||
|
|
||||
*/
|
||||
|
||||
'currency_locale' => env('CASHIER_CURRENCY_LOCALE', 'en'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Payment Confirmation Notification
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If this setting is enabled, Cashier will automatically notify customers
|
||||
| whose payments require additional verification. You should listen to
|
||||
| Stripe's webhooks in order for this feature to function correctly.
|
||||
|
|
||||
*/
|
||||
|
||||
'payment_notification' => env('CASHIER_PAYMENT_NOTIFICATION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Invoice Paper Size
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option is the default paper size for all invoices generated using
|
||||
| Cashier. You are free to customize this settings based on the usual
|
||||
| paper size used by the customers using your Laravel applications.
|
||||
|
|
||||
| Supported sizes: 'letter', 'legal', 'A4'
|
||||
|
|
||||
*/
|
||||
|
||||
'paper' => env('CASHIER_PAPER', 'letter'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stripe Logger
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This setting defines which logging channel will be used by the Stripe
|
||||
| library to write log messages. You are free to specify any of your
|
||||
| logging channels listed inside the "logging" configuration file.
|
||||
|
|
||||
*/
|
||||
|
||||
'logger' => env('CASHIER_LOGGER'),
|
||||
];
|
||||
@@ -4,179 +4,127 @@ return [
|
||||
'pages' => [
|
||||
[
|
||||
'visibility' => 1,
|
||||
'title' => 'Terms of Service',
|
||||
'slug' => 'terms-of-service',
|
||||
'content' => 'Laoreet cum hendrerit iaculis arcu phasellus congue et elementum, pharetra risus imperdiet aptent posuere rutrum parturient blandit, dapibus tellus ridiculus potenti aliquam sociis turpis. Nullam commodo eget laoreet risus cursus vel placerat, in dapibus sociis gravida faucibus sodales, fringilla potenti elit semper iaculis ullamcorper. Dignissim vulputate pretium montes pellentesque mollis, consectetur adipiscing curabitur semper sem rhoncus, litora viverra curae proin.',
|
||||
'title' => 'Terms of Service',
|
||||
'slug' => 'terms-of-service',
|
||||
'content' => 'Laoreet cum hendrerit iaculis arcu phasellus congue et elementum, pharetra risus imperdiet aptent posuere rutrum parturient blandit, dapibus tellus ridiculus potenti aliquam sociis turpis. Nullam commodo eget laoreet risus cursus vel placerat, in dapibus sociis gravida faucibus sodales, fringilla potenti elit semper iaculis ullamcorper. Dignissim vulputate pretium montes pellentesque mollis, consectetur adipiscing curabitur semper sem rhoncus, litora viverra curae proin.',
|
||||
],
|
||||
[
|
||||
'visibility' => 1,
|
||||
'title' => 'Privacy Policy',
|
||||
'slug' => 'privacy-policy',
|
||||
'content' => 'Sit orci justo augue maecenas laoreet consectetur natoque magnis in viverra sagittis, himenaeos urna facilisis mus proin primis diam accumsan tristique inceptos. Primis quisque posuere sit praesent lobortis feugiat semper convallis facilisis, vivamus gravida ligula nostra curae eu donec duis parturient senectus, arcu dolor viverra penatibus natoque cum nisi commodo. Litora sociis mauris justo nullam suspendisse mattis maecenas nascetur congue phasellus cras ultricies posuere donec, dapibus egestas diam lacus ornare montes senectus tincidunt eu taciti sed consequat.',
|
||||
'title' => 'Privacy Policy',
|
||||
'slug' => 'privacy-policy',
|
||||
'content' => 'Sit orci justo augue maecenas laoreet consectetur natoque magnis in viverra sagittis, himenaeos urna facilisis mus proin primis diam accumsan tristique inceptos. Primis quisque posuere sit praesent lobortis feugiat semper convallis facilisis, vivamus gravida ligula nostra curae eu donec duis parturient senectus, arcu dolor viverra penatibus natoque cum nisi commodo. Litora sociis mauris justo nullam suspendisse mattis maecenas nascetur congue phasellus cras ultricies posuere donec, dapibus egestas diam lacus ornare montes senectus tincidunt eu taciti sed consequat.',
|
||||
],
|
||||
[
|
||||
'visibility' => 1,
|
||||
'title' => 'Cookie Policy',
|
||||
'slug' => 'cookie-policy',
|
||||
'content' => 'Metus penatibus ligula dolor natoque non habitasse laoreet facilisis, libero vivamus eget semper vulputate interdum integer, phasellus lorem enim blandit consectetur nullam sollicitudin. Hendrerit interdum luctus ut in molestie himenaeos eros cum laoreet parturient est, eu lectus hac et netus viverra dictumst congue elit sem senectus litora, fames scelerisque adipiscing inceptos fringilla montes sociosqu suscipit auctor potenti. Elementum lacus vulputate viverra ac morbi ligula ipsum facilisi, sit eu imperdiet lacinia congue dis vitae.',
|
||||
'title' => 'Cookie Policy',
|
||||
'slug' => 'cookie-policy',
|
||||
'content' => 'Metus penatibus ligula dolor natoque non habitasse laoreet facilisis, libero vivamus eget semper vulputate interdum integer, phasellus lorem enim blandit consectetur nullam sollicitudin. Hendrerit interdum luctus ut in molestie himenaeos eros cum laoreet parturient est, eu lectus hac et netus viverra dictumst congue elit sem senectus litora, fames scelerisque adipiscing inceptos fringilla montes sociosqu suscipit auctor potenti. Elementum lacus vulputate viverra ac morbi ligula ipsum facilisi, sit eu imperdiet lacinia congue dis vitae.',
|
||||
],
|
||||
],
|
||||
'content' => [
|
||||
'regular' => [
|
||||
[
|
||||
'name' => 'section_features',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_feature_boxes',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_get_started',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'header_title',
|
||||
'value' => 'Simple <span class="text-theme">&</span> Powerful Personal Cloud Storage',
|
||||
],
|
||||
[
|
||||
'name' => 'header_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'features_title',
|
||||
'value' => 'The Fastest Growing <span class="text-theme">File Manager</span> on the CodeCanyon Market',
|
||||
],
|
||||
[
|
||||
'name' => 'features_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_1',
|
||||
'value' => 'Truly Freedom',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_1',
|
||||
'value' => 'You have full control over VueFileManager, no third authorities will control your service or usage, only you.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_2',
|
||||
'value' => 'The Sky is the Limit',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_2',
|
||||
'value' => 'VueFileManager is cloud storage software. You have to install and running application on your own server hosting.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_3',
|
||||
'value' => 'No Monthly Fees',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_3',
|
||||
'value' => 'When you running VueFileManager on your own server hosting, anybody can\'t control your content or resell your user data. Your data is safe.',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_title',
|
||||
'value' => 'Ready to Get <span class="text-theme">Started</span><br> With Us?',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'footer_content',
|
||||
'value' => '© 2021 Simple & Powerful Personal Cloud Storage. Developed by <a href="https://hi5ve.digital" target="_blank">Hi5Ve.Digital</a>',
|
||||
],
|
||||
[
|
||||
'name' => 'allow_homepage',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'app_color',
|
||||
'value' => '#00BC7E',
|
||||
],
|
||||
[
|
||||
'name' => 'section_features',
|
||||
'value' => 1,
|
||||
],
|
||||
'extended' => [
|
||||
[
|
||||
'name' => 'section_features',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_feature_boxes',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_pricing_content',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_get_started',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'header_title',
|
||||
'value' => 'Simple <span class="text-theme">&</span> Powerful Personal Cloud Storage',
|
||||
],
|
||||
[
|
||||
'name' => 'header_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'features_title',
|
||||
'value' => 'The Fastest Growing <span class="text-theme">File Manager</span> on the CodeCanyon Market',
|
||||
],
|
||||
[
|
||||
'name' => 'features_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_1',
|
||||
'value' => 'Truly Freedom',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_1',
|
||||
'value' => 'You have full control over VueFileManager, no third authorities will control your service or usage, only you.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_2',
|
||||
'value' => 'The Sky is the Limit',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_2',
|
||||
'value' => 'VueFileManager is cloud storage software. You have to install and running application on your own server hosting.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_3',
|
||||
'value' => 'No Monthly Fees',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_3',
|
||||
'value' => 'When you running VueFileManager on your own server hosting, anybody can\'t control your content or resell your user data. Your data is safe.',
|
||||
],
|
||||
[
|
||||
'name' => 'pricing_title',
|
||||
'value' => 'Pick the <span class="text-theme">Best Plan</span> For Your Needs',
|
||||
],
|
||||
[
|
||||
'name' => 'pricing_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_title',
|
||||
'value' => 'Ready to Get <span class="text-theme">Started</span><br> With Us?',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'footer_content',
|
||||
'value' => '© 2021 Simple & Powerful Personal Cloud Storage. Developed by <a href="https://hi5ve.digital" target="_blank" class="text-theme">Hi5Ve.Digital</a>',
|
||||
],
|
||||
[
|
||||
'name' => 'app_color',
|
||||
'value' => '#00BC7E',
|
||||
],
|
||||
[
|
||||
'name' => 'section_feature_boxes',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_pricing_content',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'section_get_started',
|
||||
'value' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'header_title',
|
||||
'value' => 'Simple <span class="text-theme">&</span> Powerful Personal Cloud Storage',
|
||||
],
|
||||
[
|
||||
'name' => 'header_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'features_title',
|
||||
'value' => 'The Fastest Growing <span class="text-theme">File Manager</span> on the CodeCanyon Market',
|
||||
],
|
||||
[
|
||||
'name' => 'features_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_1',
|
||||
'value' => 'Truly Freedom',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_1',
|
||||
'value' => 'You have full control over VueFileManager, no third authorities will control your service or usage, only you.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_2',
|
||||
'value' => 'The Sky is the Limit',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_2',
|
||||
'value' => 'VueFileManager is cloud storage software. You have to install and running application on your own server hosting.',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_title_3',
|
||||
'value' => 'No Monthly Fees',
|
||||
],
|
||||
[
|
||||
'name' => 'feature_description_3',
|
||||
'value' => 'When you running VueFileManager on your own server hosting, anybody can\'t control your content or resell your user data. Your data is safe.',
|
||||
],
|
||||
[
|
||||
'name' => 'pricing_title',
|
||||
'value' => 'Pick the <span class="text-theme">Best Plan</span> For Your Needs',
|
||||
],
|
||||
[
|
||||
'name' => 'pricing_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_title',
|
||||
'value' => 'Ready to Get <span class="text-theme">Started</span><br> With Us?',
|
||||
],
|
||||
[
|
||||
'name' => 'get_started_description',
|
||||
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||
],
|
||||
[
|
||||
'name' => 'footer_content',
|
||||
'value' => '© 2022 Simple & Powerful Personal Cloud Storage. Developed by <a href="https://hi5ve.digital" target="_blank" class="text-theme">Hi5Ve.Digital</a>',
|
||||
],
|
||||
[
|
||||
'name' => 'allowed_adsense',
|
||||
'value' => 0,
|
||||
],
|
||||
[
|
||||
'name' => 'allowed_recaptcha',
|
||||
'value' => 0,
|
||||
],
|
||||
[
|
||||
'name' => 'paypal_payment_description',
|
||||
'value' => 'Available PayPal Credit, Debit or Credit Card.',
|
||||
],
|
||||
[
|
||||
'name' => 'paystack_payment_description',
|
||||
'value' => 'Available Bank Account, USSD, Mobile Money, Apple Pay.',
|
||||
],
|
||||
[
|
||||
'name' => 'stripe_payment_description',
|
||||
'value' => 'Available credit card or Apple Pay.',
|
||||
],
|
||||
[
|
||||
'name' => 'allowed_registration_bonus',
|
||||
'value' => 0,
|
||||
],
|
||||
[
|
||||
'name' => 'registration_bonus_amount',
|
||||
'value' => 0,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -34,29 +34,29 @@ return [
|
||||
|
||||
'connections' => [
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
'dump' => [
|
||||
@@ -67,30 +67,30 @@ return [
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
],
|
||||
],
|
||||
@@ -124,22 +124,22 @@ return [
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
],
|
||||
|
||||
557
config/disposable-email-providers.php
Normal file
557
config/disposable-email-providers.php
Normal file
@@ -0,0 +1,557 @@
|
||||
<?php
|
||||
|
||||
// List based on michenriksen/disposable-email-provider-domains
|
||||
// https://gist.github.com/michenriksen/8710649
|
||||
|
||||
return [
|
||||
'0815.ru',
|
||||
'0wnd.net',
|
||||
'0wnd.org',
|
||||
'10minutemail.co.za',
|
||||
'10minutemail.com',
|
||||
'123-m.com',
|
||||
'1fsdfdsfsdf.tk',
|
||||
'1pad.de',
|
||||
'20minutemail.com',
|
||||
'21cn.com',
|
||||
'2fdgdfgdfgdf.tk',
|
||||
'2prong.com',
|
||||
'30minutemail.com',
|
||||
'33mail.com',
|
||||
'3trtretgfrfe.tk',
|
||||
'4gfdsgfdgfd.tk',
|
||||
'4warding.com',
|
||||
'5ghgfhfghfgh.tk',
|
||||
'6hjgjhgkilkj.tk',
|
||||
'6paq.com',
|
||||
'7tags.com',
|
||||
'9ox.net',
|
||||
'a-bc.net',
|
||||
'agedmail.com',
|
||||
'ama-trade.de',
|
||||
'amilegit.com',
|
||||
'amiri.net',
|
||||
'amiriindustries.com',
|
||||
'anonmails.de',
|
||||
'anonymbox.com',
|
||||
'antichef.com',
|
||||
'antichef.net',
|
||||
'antireg.ru',
|
||||
'antispam.de',
|
||||
'antispammail.de',
|
||||
'armyspy.com',
|
||||
'artman-conception.com',
|
||||
'azmeil.tk',
|
||||
'baxomale.ht.cx',
|
||||
'beefmilk.com',
|
||||
'bigstring.com',
|
||||
'binkmail.com',
|
||||
'bio-muesli.net',
|
||||
'bobmail.info',
|
||||
'bodhi.lawlita.com',
|
||||
'bofthew.com',
|
||||
'bootybay.de',
|
||||
'boun.cr',
|
||||
'bouncr.com',
|
||||
'breakthru.com',
|
||||
'brefmail.com',
|
||||
'bsnow.net',
|
||||
'bspamfree.org',
|
||||
'bugmenot.com',
|
||||
'bund.us',
|
||||
'burstmail.info',
|
||||
'buymoreplays.com',
|
||||
'byom.de',
|
||||
'c2.hu',
|
||||
'card.zp.ua',
|
||||
'casualdx.com',
|
||||
'cek.pm',
|
||||
'centermail.com',
|
||||
'centermail.net',
|
||||
'chammy.info',
|
||||
'childsavetrust.org',
|
||||
'chogmail.com',
|
||||
'choicemail1.com',
|
||||
'clixser.com',
|
||||
'cmail.net',
|
||||
'cmail.org',
|
||||
'coldemail.info',
|
||||
'cool.fr.nf',
|
||||
'courriel.fr.nf',
|
||||
'courrieltemporaire.com',
|
||||
'crapmail.org',
|
||||
'cust.in',
|
||||
'cuvox.de',
|
||||
'd3p.dk',
|
||||
'dacoolest.com',
|
||||
'dandikmail.com',
|
||||
'dayrep.com',
|
||||
'dcemail.com',
|
||||
'deadaddress.com',
|
||||
'deadspam.com',
|
||||
'delikkt.de',
|
||||
'despam.it',
|
||||
'despammed.com',
|
||||
'devnullmail.com',
|
||||
'dfgh.net',
|
||||
'digitalsanctuary.com',
|
||||
'dingbone.com',
|
||||
'disposableaddress.com',
|
||||
'disposableemailaddresses.com',
|
||||
'disposableinbox.com',
|
||||
'dispose.it',
|
||||
'dispostable.com',
|
||||
'dodgeit.com',
|
||||
'dodgit.com',
|
||||
'donemail.ru',
|
||||
'dontreg.com',
|
||||
'dontsendmespam.de',
|
||||
'drdrb.net',
|
||||
'dump-email.info',
|
||||
'dumpandjunk.com',
|
||||
'dumpyemail.com',
|
||||
'e-mail.com',
|
||||
'e-mail.org',
|
||||
'e4ward.com',
|
||||
'easytrashmail.com',
|
||||
'einmalmail.de',
|
||||
'einrot.com',
|
||||
'eintagsmail.de',
|
||||
'emailgo.de',
|
||||
'emailias.com',
|
||||
'emaillime.com',
|
||||
'emailsensei.com',
|
||||
'emailtemporanea.com',
|
||||
'emailtemporanea.net',
|
||||
'emailtemporar.ro',
|
||||
'emailtemporario.com.br',
|
||||
'emailthe.net',
|
||||
'emailtmp.com',
|
||||
'emailwarden.com',
|
||||
'emailx.at.hm',
|
||||
'emailxfer.com',
|
||||
'emeil.in',
|
||||
'emeil.ir',
|
||||
'emz.net',
|
||||
'ero-tube.org',
|
||||
'evopo.com',
|
||||
'explodemail.com',
|
||||
'express.net.ua',
|
||||
'eyepaste.com',
|
||||
'fakeinbox.com',
|
||||
'fakeinformation.com',
|
||||
'fansworldwide.de',
|
||||
'fantasymail.de',
|
||||
'fightallspam.com',
|
||||
'filzmail.com',
|
||||
'fivemail.de',
|
||||
'fleckens.hu',
|
||||
'frapmail.com',
|
||||
'friendlymail.co.uk',
|
||||
'fuckingduh.com',
|
||||
'fudgerub.com',
|
||||
'fyii.de',
|
||||
'garliclife.com',
|
||||
'gehensiemirnichtaufdensack.de',
|
||||
'get2mail.fr',
|
||||
'getairmail.com',
|
||||
'getmails.eu',
|
||||
'getonemail.com',
|
||||
'giantmail.de',
|
||||
'girlsundertheinfluence.com',
|
||||
'gishpuppy.com',
|
||||
'gmial.com',
|
||||
'goemailgo.com',
|
||||
'gotmail.net',
|
||||
'gotmail.org',
|
||||
'gotti.otherinbox.com',
|
||||
'great-host.in',
|
||||
'greensloth.com',
|
||||
'grr.la',
|
||||
'gsrv.co.uk',
|
||||
'guerillamail.biz',
|
||||
'guerillamail.com',
|
||||
'guerrillamail.biz',
|
||||
'guerrillamail.com',
|
||||
'guerrillamail.de',
|
||||
'guerrillamail.info',
|
||||
'guerrillamail.net',
|
||||
'guerrillamail.org',
|
||||
'guerrillamailblock.com',
|
||||
'gustr.com',
|
||||
'harakirimail.com',
|
||||
'hat-geld.de',
|
||||
'hatespam.org',
|
||||
'herp.in',
|
||||
'hidemail.de',
|
||||
'hidzz.com',
|
||||
'hmamail.com',
|
||||
'hopemail.biz',
|
||||
'ieh-mail.de',
|
||||
'ikbenspamvrij.nl',
|
||||
'imails.info',
|
||||
'inbax.tk',
|
||||
'inbox.si',
|
||||
'inboxalias.com',
|
||||
'inboxclean.com',
|
||||
'inboxclean.org',
|
||||
'infocom.zp.ua',
|
||||
'instant-mail.de',
|
||||
'ip6.li',
|
||||
'irish2me.com',
|
||||
'iwi.net',
|
||||
'jetable.com',
|
||||
'jetable.fr.nf',
|
||||
'jetable.net',
|
||||
'jetable.org',
|
||||
'jnxjn.com',
|
||||
'jourrapide.com',
|
||||
'jsrsolutions.com',
|
||||
'kasmail.com',
|
||||
'kaspop.com',
|
||||
'killmail.com',
|
||||
'killmail.net',
|
||||
'klassmaster.com',
|
||||
'klzlk.com',
|
||||
'koszmail.pl',
|
||||
'kurzepost.de',
|
||||
'lawlita.com',
|
||||
'letthemeatspam.com',
|
||||
'lhsdv.com',
|
||||
'lifebyfood.com',
|
||||
'link2mail.net',
|
||||
'litedrop.com',
|
||||
'lol.ovpn.to',
|
||||
'lolfreak.net',
|
||||
'lookugly.com',
|
||||
'lortemail.dk',
|
||||
'lr78.com',
|
||||
'lroid.com',
|
||||
'lukop.dk',
|
||||
'm21.cc',
|
||||
'mail-filter.com',
|
||||
'mail-temporaire.fr',
|
||||
'mail.by',
|
||||
'mail.mezimages.net',
|
||||
'mail.zp.ua',
|
||||
'mail1a.de',
|
||||
'mail21.cc',
|
||||
'mail2rss.org',
|
||||
'mail333.com',
|
||||
'mailbidon.com',
|
||||
'mailbiz.biz',
|
||||
'mailblocks.com',
|
||||
'mailbucket.org',
|
||||
'mailcat.biz',
|
||||
'mailcatch.com',
|
||||
'mailde.de',
|
||||
'mailde.info',
|
||||
'maildrop.cc',
|
||||
'maileimer.de',
|
||||
'mailexpire.com',
|
||||
'mailfa.tk',
|
||||
'mailforspam.com',
|
||||
'mailfreeonline.com',
|
||||
'mailguard.me',
|
||||
'mailin8r.com',
|
||||
'mailinater.com',
|
||||
'mailinator.com',
|
||||
'mailinator.net',
|
||||
'mailinator.org',
|
||||
'mailinator2.com',
|
||||
'mailincubator.com',
|
||||
'mailismagic.com',
|
||||
'mailme.lv',
|
||||
'mailme24.com',
|
||||
'mailmetrash.com',
|
||||
'mailmoat.com',
|
||||
'mailms.com',
|
||||
'mailnesia.com',
|
||||
'mailnull.com',
|
||||
'mailorg.org',
|
||||
'mailpick.biz',
|
||||
'mailrock.biz',
|
||||
'mailscrap.com',
|
||||
'mailshell.com',
|
||||
'mailsiphon.com',
|
||||
'mailtemp.info',
|
||||
'mailtome.de',
|
||||
'mailtothis.com',
|
||||
'mailtrash.net',
|
||||
'mailtv.net',
|
||||
'mailtv.tv',
|
||||
'mailzilla.com',
|
||||
'makemetheking.com',
|
||||
'manybrain.com',
|
||||
'mbx.cc',
|
||||
'mega.zik.dj',
|
||||
'meinspamschutz.de',
|
||||
'meltmail.com',
|
||||
'messagebeamer.de',
|
||||
'mezimages.net',
|
||||
'ministry-of-silly-walks.de',
|
||||
'mintemail.com',
|
||||
'misterpinball.de',
|
||||
'moncourrier.fr.nf',
|
||||
'monemail.fr.nf',
|
||||
'monmail.fr.nf',
|
||||
'monumentmail.com',
|
||||
'mt2009.com',
|
||||
'mt2014.com',
|
||||
'mycard.net.ua',
|
||||
'mycleaninbox.net',
|
||||
'mymail-in.net',
|
||||
'mypacks.net',
|
||||
'mypartyclip.de',
|
||||
'myphantomemail.com',
|
||||
'mysamp.de',
|
||||
'mytempemail.com',
|
||||
'mytempmail.com',
|
||||
'mytrashmail.com',
|
||||
'nabuma.com',
|
||||
'neomailbox.com',
|
||||
'nepwk.com',
|
||||
'nervmich.net',
|
||||
'nervtmich.net',
|
||||
'netmails.com',
|
||||
'netmails.net',
|
||||
'neverbox.com',
|
||||
'nice-4u.com',
|
||||
'nincsmail.hu',
|
||||
'nnh.com',
|
||||
'no-spam.ws',
|
||||
'noblepioneer.com',
|
||||
'nomail.pw',
|
||||
'nomail.xl.cx',
|
||||
'nomail2me.com',
|
||||
'nomorespamemails.com',
|
||||
'nospam.ze.tc',
|
||||
'nospam4.us',
|
||||
'nospamfor.us',
|
||||
'nospammail.net',
|
||||
'notmailinator.com',
|
||||
'nowhere.org',
|
||||
'nowmymail.com',
|
||||
'nurfuerspam.de',
|
||||
'nus.edu.sg',
|
||||
'objectmail.com',
|
||||
'obobbo.com',
|
||||
'odnorazovoe.ru',
|
||||
'oneoffemail.com',
|
||||
'onewaymail.com',
|
||||
'onlatedotcom.info',
|
||||
'online.ms',
|
||||
'opayq.com',
|
||||
'ordinaryamerican.net',
|
||||
'otherinbox.com',
|
||||
'ovpn.to',
|
||||
'owlpic.com',
|
||||
'pancakemail.com',
|
||||
'pcusers.otherinbox.com',
|
||||
'pjjkp.com',
|
||||
'plexolan.de',
|
||||
'poczta.onet.pl',
|
||||
'politikerclub.de',
|
||||
'poofy.org',
|
||||
'pookmail.com',
|
||||
'privacy.net',
|
||||
'privatdemail.net',
|
||||
'proxymail.eu',
|
||||
'prtnx.com',
|
||||
'putthisinyourspamdatabase.com',
|
||||
'putthisinyourspamdatabase.com',
|
||||
'qq.com',
|
||||
'quickinbox.com',
|
||||
'rcpt.at',
|
||||
'reallymymail.com',
|
||||
'realtyalerts.ca',
|
||||
'recode.me',
|
||||
'recursor.net',
|
||||
'reliable-mail.com',
|
||||
'rhyta.com',
|
||||
'rmqkr.net',
|
||||
'royal.net',
|
||||
'rtrtr.com',
|
||||
's0ny.net',
|
||||
'safe-mail.net',
|
||||
'safersignup.de',
|
||||
'safetymail.info',
|
||||
'safetypost.de',
|
||||
'saynotospams.com',
|
||||
'schafmail.de',
|
||||
'schrott-email.de',
|
||||
'secretemail.de',
|
||||
'secure-mail.biz',
|
||||
'senseless-entertainment.com',
|
||||
'services391.com',
|
||||
'sharklasers.com',
|
||||
'shieldemail.com',
|
||||
'shiftmail.com',
|
||||
'shitmail.me',
|
||||
'shitware.nl',
|
||||
'shmeriously.com',
|
||||
'shortmail.net',
|
||||
'sibmail.com',
|
||||
'sinnlos-mail.de',
|
||||
'slapsfromlastnight.com',
|
||||
'slaskpost.se',
|
||||
'smashmail.de',
|
||||
'smellfear.com',
|
||||
'snakemail.com',
|
||||
'sneakemail.com',
|
||||
'sneakmail.de',
|
||||
'snkmail.com',
|
||||
'sofimail.com',
|
||||
'solvemail.info',
|
||||
'sogetthis.com',
|
||||
'soodonims.com',
|
||||
'spam4.me',
|
||||
'spamail.de',
|
||||
'spamarrest.com',
|
||||
'spambob.net',
|
||||
'spambog.ru',
|
||||
'spambox.us',
|
||||
'spamcannon.com',
|
||||
'spamcannon.net',
|
||||
'spamcon.org',
|
||||
'spamcorptastic.com',
|
||||
'spamcowboy.com',
|
||||
'spamcowboy.net',
|
||||
'spamcowboy.org',
|
||||
'spamday.com',
|
||||
'spamex.com',
|
||||
'spamfree.eu',
|
||||
'spamfree24.com',
|
||||
'spamfree24.de',
|
||||
'spamfree24.org',
|
||||
'spamgoes.in',
|
||||
'spamgourmet.com',
|
||||
'spamgourmet.net',
|
||||
'spamgourmet.org',
|
||||
'spamherelots.com',
|
||||
'spamherelots.com',
|
||||
'spamhereplease.com',
|
||||
'spamhereplease.com',
|
||||
'spamhole.com',
|
||||
'spamify.com',
|
||||
'spaml.de',
|
||||
'spammotel.com',
|
||||
'spamobox.com',
|
||||
'spamslicer.com',
|
||||
'spamspot.com',
|
||||
'spamthis.co.uk',
|
||||
'spamtroll.net',
|
||||
'speed.1s.fr',
|
||||
'spoofmail.de',
|
||||
'stuffmail.de',
|
||||
'super-auswahl.de',
|
||||
'supergreatmail.com',
|
||||
'supermailer.jp',
|
||||
'superrito.com',
|
||||
'superstachel.de',
|
||||
'suremail.info',
|
||||
'talkinator.com',
|
||||
'teewars.org',
|
||||
'teleworm.com',
|
||||
'teleworm.us',
|
||||
'temp-mail.org',
|
||||
'temp-mail.ru',
|
||||
'tempe-mail.com',
|
||||
'tempemail.co.za',
|
||||
'tempemail.com',
|
||||
'tempemail.net',
|
||||
'tempemail.net',
|
||||
'tempinbox.co.uk',
|
||||
'tempinbox.com',
|
||||
'tempmail.eu',
|
||||
'tempmaildemo.com',
|
||||
'tempmailer.com',
|
||||
'tempmailer.de',
|
||||
'tempomail.fr',
|
||||
'temporaryemail.net',
|
||||
'temporaryforwarding.com',
|
||||
'temporaryinbox.com',
|
||||
'temporarymailaddress.com',
|
||||
'tempthe.net',
|
||||
'thankyou2010.com',
|
||||
'thc.st',
|
||||
'thelimestones.com',
|
||||
'thisisnotmyrealemail.com',
|
||||
'thismail.net',
|
||||
'throwawayemailaddress.com',
|
||||
'tilien.com',
|
||||
'tittbit.in',
|
||||
'tizi.com',
|
||||
'tmailinator.com',
|
||||
'toomail.biz',
|
||||
'topranklist.de',
|
||||
'tradermail.info',
|
||||
'trash-mail.at',
|
||||
'trash-mail.com',
|
||||
'trash-mail.de',
|
||||
'trash2009.com',
|
||||
'trashdevil.com',
|
||||
'trashemail.de',
|
||||
'trashmail.at',
|
||||
'trashmail.com',
|
||||
'trashmail.de',
|
||||
'trashmail.me',
|
||||
'trashmail.net',
|
||||
'trashmail.org',
|
||||
'trashymail.com',
|
||||
'trialmail.de',
|
||||
'trillianpro.com',
|
||||
'twinmail.de',
|
||||
'tyldd.com',
|
||||
'uggsrock.com',
|
||||
'umail.net',
|
||||
'uroid.com',
|
||||
'us.af',
|
||||
'venompen.com',
|
||||
'veryrealemail.com',
|
||||
'viditag.com',
|
||||
'viralplays.com',
|
||||
'vpn.st',
|
||||
'vsimcard.com',
|
||||
'vubby.com',
|
||||
'wasteland.rfc822.org',
|
||||
'webemail.me',
|
||||
'weg-werf-email.de',
|
||||
'wegwerf-emails.de',
|
||||
'wegwerfadresse.de',
|
||||
'wegwerfemail.com',
|
||||
'wegwerfemail.de',
|
||||
'wegwerfmail.de',
|
||||
'wegwerfmail.info',
|
||||
'wegwerfmail.net',
|
||||
'wegwerfmail.org',
|
||||
'wh4f.org',
|
||||
'whyspam.me',
|
||||
'willhackforfood.biz',
|
||||
'willselfdestruct.com',
|
||||
'winemaven.info',
|
||||
'wronghead.com',
|
||||
'www.e4ward.com',
|
||||
'www.mailinator.com',
|
||||
'wwwnew.eu',
|
||||
'x.ip6.li',
|
||||
'xagloo.com',
|
||||
'xemaps.com',
|
||||
'xents.com',
|
||||
'xmaily.com',
|
||||
'xoxy.net',
|
||||
'yep.it',
|
||||
'yogamaven.com',
|
||||
'yopmail.com',
|
||||
'yopmail.fr',
|
||||
'yopmail.net',
|
||||
'yourdomain.com',
|
||||
'yuurok.com',
|
||||
'z1p.biz',
|
||||
'za.com',
|
||||
'zehnminuten.de',
|
||||
'zehnminutenmail.de',
|
||||
'zippymail.info',
|
||||
'zoemail.net',
|
||||
'zomg.info',
|
||||
];
|
||||
@@ -12,20 +12,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cloud Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Many applications store files both locally and in the cloud. For this
|
||||
| reason, you may specify a default "cloud" driver here. This driver
|
||||
| will be bound as the Cloud disk implementation in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -43,60 +30,37 @@ return [
|
||||
'disks' => [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
'oss' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('OSS_ACCESS_KEY_ID'),
|
||||
'secret' => env('OSS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('OSS_REGION'),
|
||||
'bucket' => env('OSS_BUCKET'),
|
||||
'endpoint' => env('OSS_ENDPOINT'),
|
||||
'url' => env('OSS_URL'),
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'endpoint' => env('AWS_URL'),
|
||||
'driver' => 's3',
|
||||
'key' => env('S3_ACCESS_KEY_ID'),
|
||||
'secret' => env('S3_SECRET_ACCESS_KEY'),
|
||||
'region' => env('S3_DEFAULT_REGION'),
|
||||
'bucket' => env('S3_BUCKET'),
|
||||
'endpoint' => env('S3_URL'),
|
||||
'visibility' => 'private',
|
||||
],
|
||||
|
||||
'spaces' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('DO_SPACES_KEY'),
|
||||
'secret' => env('DO_SPACES_SECRET'),
|
||||
'endpoint' => env('DO_SPACES_ENDPOINT'),
|
||||
'region' => env('DO_SPACES_REGION'),
|
||||
'bucket' => env('DO_SPACES_BUCKET'),
|
||||
'ftp' => [
|
||||
'driver' => 'ftp',
|
||||
'host' => env('FTP_HOST'),
|
||||
'username' => env('FTP_USERNAME'),
|
||||
'password' => env('FTP_PASSWORD'),
|
||||
],
|
||||
|
||||
'wasabi' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('WASABI_KEY'),
|
||||
'secret' => env('WASABI_SECRET'),
|
||||
'endpoint' => env('WASABI_ENDPOINT'),
|
||||
'region' => env('WASABI_REGION'),
|
||||
'bucket' => env('WASABI_BUCKET'),
|
||||
],
|
||||
|
||||
'backblaze' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('BACKBLAZE_KEY'),
|
||||
'secret' => env('BACKBLAZE_SECRET'),
|
||||
'endpoint' => env('BACKBLAZE_ENDPOINT'),
|
||||
'region' => env('BACKBLAZE_REGION'),
|
||||
'bucket' => env('BACKBLAZE_BUCKET'),
|
||||
'azure' => [
|
||||
'driver' => 'azure',
|
||||
'name' => env('AZURE_STORAGE_NAME'),
|
||||
'key' => env('AZURE_STORAGE_KEY'),
|
||||
'container' => env('AZURE_STORAGE_CONTAINER'),
|
||||
'url' => env('AZURE_STORAGE_URL'),
|
||||
'prefix' => null,
|
||||
'connection_string' => env('AZURE_STORAGE_CONNECTION_STRING'), // optional, will override default endpoint builder
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -102,7 +102,7 @@ return [
|
||||
*/
|
||||
|
||||
'limiters' => [
|
||||
'login' => 'login',
|
||||
'login' => 'login',
|
||||
'two-factor' => 'two-factor',
|
||||
],
|
||||
|
||||
@@ -131,13 +131,9 @@ return [
|
||||
*/
|
||||
|
||||
'features' => [
|
||||
Features::registration(),
|
||||
//Features::resetPasswords(),
|
||||
// Features::emailVerification(),
|
||||
Features::updateProfileInformation(),
|
||||
//Features::updatePasswords(),
|
||||
/*Features::twoFactorAuthentication([
|
||||
Features::twoFactorAuthentication([
|
||||
'confirm' => true,
|
||||
'confirmPassword' => true,
|
||||
]),*/
|
||||
]),
|
||||
],
|
||||
];
|
||||
|
||||
@@ -43,8 +43,8 @@ return [
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,6 @@
|
||||
|
||||
return [
|
||||
'enable' => env('LARAVEL_QUERY_MONITOR', true),
|
||||
'host' => env('LARAVEL_QUERY_MONITOR_HOST', '0.0.0.0'),
|
||||
'port' => env('LARAVEL_QUERY_MONITOR_PORT', 8081),
|
||||
'host' => env('LARAVEL_QUERY_MONITOR_HOST', '0.0.0.0'),
|
||||
'port' => env('LARAVEL_QUERY_MONITOR_PORT', 8081),
|
||||
];
|
||||
|
||||
@@ -35,36 +35,36 @@ return [
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 14,
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 14,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => 'debug',
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'driver' => 'monolog',
|
||||
'level' => 'debug',
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
@@ -72,26 +72,26 @@ return [
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => 'debug',
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => 'debug',
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ return [
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
@@ -33,35 +33,35 @@ return [
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => 0,
|
||||
'block_for' => 0,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'key' => env('S3_ACCESS_KEY_ID'),
|
||||
'secret' => env('S3_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||
'region' => env('S3_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
'block_for' => null,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -77,8 +77,8 @@ return [
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
];
|
||||
|
||||
45
config/sanctum.php
Normal file
45
config/sanctum.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stateful Domains
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Requests from the following domains / hosts will receive stateful API
|
||||
| authentication cookies. Typically, these should include your local
|
||||
| and production domains which access your API via a frontend SPA.
|
||||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1,127.0.0.1:8000,::1')),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Expiration Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value controls the number of minutes until an issued token will be
|
||||
| considered expired. If this value is null, personal access tokens do
|
||||
| not expire. This won't tweak the lifetime of first-party sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'expiration' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When authenticating your first-party SPA with Sanctum you may need to
|
||||
| customize some of the middleware Sanctum uses while processing the
|
||||
| request. You may change the middleware listed below as required.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'verify_csrf_token' => Support\Middleware\VerifyCsrfToken::class,
|
||||
'encrypt_cookies' => Support\Middleware\EncryptCookies::class,
|
||||
],
|
||||
];
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user