data
data: function () {
return {
organization: {
name: "",
reviews: [],
images: [],
}
},
async asyncData({query, $axios}) {
let params = Object.assign({}, query)
let organization = {}
await $axios.$get(`${process.env.api}/organizations.getById`, {
params
}).then(({code, data}) => {
organization = data
});
return {
organization
}
},
server {
listen 80;
client_max_body_size 208M;
access_log /var/log/nginx/secure.access.log;
error_log /var/log/nginx/secure.error.log error;
root /www/public;
add_header "Access-Control-Allow-Origin" "*";
add_header "Access-Control-Allow-Headers" "Origin, X-Requested-With, Content-Type, Accept, Authorization";
add_header "Access-Control-Request-Methods" "GET, POST, OPTIONS";
location / {
try_files $uri $uri/ /secure.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index secure.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
UniqueEntity
работает только с Entity. Если хотите валидировать таким образом DTO, то придется написать свой валидатор. За основу можно взять встроенный: https://github.com/symfony/symfony/blob/master/src...