-
Entity 生成路由
- ApiPlatform 会根据 Entity 的
@ApiResource
注解, 自动生成路由. - 路由名称, 由
Inflector::pluralize(Greeting::class)
自动生成/greetings
复数形式的资源名称 - 单词间默认是
_
分隔, 文档有记录更改单词分隔符
- ApiPlatform 会根据 Entity 的
-
自定义资源方式?
-
过滤器原理?
-
迁移Expressive 方案?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION urldecode(p varchar) RETURNS varchar AS $$ | |
SELECT convert_from( CAST(E'\\x' || string_agg( CASE WHEN length(r.m[1]) = 1 THEN encode(convert_to(r.m[1], 'SQL_ASCII'), 'hex') ELSE substring(r.m[1] from 2 for 2) END, '') AS bytea), 'UTF8') | |
FROM regexp_matches(replace($1, '+', ' '), '%[0-9a-f][0-9a-f]|.', 'gi') AS r(m); | |
$$ LANGUAGE SQL STRICT; | |
CREATE OR REPLACE FUNCTION parse_url_query(p varchar) RETURNS json AS $$ | |
with kv as ( | |
select urldecode(kv[1]) k, urldecode(kv[2]) v from (select string_to_array(i, '=') kv from unnest(string_to_array(TRIM(BOTH '&' FROM $1), '&')) as s(i)) | |
) | |
select json_object(array(select k from kv), array(select v from kv)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\DBAL\Exception\ConnectionLost; | |
use Doctrine\ORM\EntityManagerInterface; | |
use Psr\Log\LoggerInterface; | |
use Psr\Log\NullLogger; | |
use Swoole\ConnectionPool; | |
/** | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wsl -d Ubuntu-20.04 -u root ip addr del $(ip addr show eth0 ^| grep 'inet\b' ^| awk '{print $2}' ^| head -n 1) dev eth0 | |
wsl -d Ubuntu-20.04 -u root ip addr add 192.168.50.2/24 broadcast 192.168.50.255 dev eth0 | |
wsl -d Ubuntu-20.04 -u root ip route add 0.0.0.0/0 via 192.168.50.1 dev eth0 | |
wsl -d Ubuntu-20.04 -u root echo nameserver 192.168.50.1 ^> /etc/resolv.conf | |
powershell -c "Get-NetAdapter 'vEthernet (WSL)' | Get-NetIPAddress | Remove-NetIPAddress -Confirm:$False; New-NetIPAddress -IPAddress 192.168.50.1 -PrefixLength 24 -InterfaceAlias 'vEthernet (WSL)'; Get-NetNat | ? Name -Eq WSLNat | Remove-NetNat -Confirm:$False; New-NetNat -Name WSLNat -InternalIPInterfaceAddressPrefix 192.168.50.0/24;" |
ssh -NfT -D 10080 root@localhost
ssh -N -f -b 0.0.0.0 -R 10080:localhost:10080 [email protected]
上监控系统:
- Zabbix
- Open-Falcon
- Prometheus
- Grafana
- elk
Vue packages version mismatch:
- [email protected]
- [email protected]
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
NewerOlder