SG
Size: a a a
SG
SG
А
А
RR
EM
ТП
В
A
Д
input ProductInput {В плэйграунде описываю мутацию
...,
gallery_id: Int @rules(apply: ["exists:galleries,id"]),
gallery_files: CreateFileGalleryBelongsToMany,
...
}
input CreateFileGalleryBelongsToMany {
connect: [ID!]
create: [FileGalleryInput!]
}
mutation createProduct($input: ProductInput!) {Переменные:
createProduct (products: $input) {
...,
gallery {
...,
files {
id
path
}
}
}
}
{Product создается, таблица products заполняется.
"input": {
...,
"gallery_id": 1,
"gallery_files": {
"create": [
{ "file_id": 1, "gallery_id": 1 }
]
}
}
}
file_gallery
(file_id, gallery_id) ничего не добавилось и при этом никаких ошибок нету...Типы
"gallery": {
"id": "1",
"name": "Product gallery for Product",
"type": "product",
"active": true,
"files": []
}
...
type Product {
...
gallery: Gallery @belongsTo
...
}
type Gallery {
id: ID!
name: String!
type: String
active: Boolean!
files: [File!]! @belongsToMany
}
DK
Route::name('admin.')->group(function () { /* routes */ }
php artisan serve
поднимает сайт на http://127.0.0.1:8000
- там все работаетhttp://admin.127.0.0.1:800
получаю This site can’t be reached. http://admin.localhost
вижу Index of / и список моих тестовых проектов.MAMP/htdocs
.А
Route::name('admin.')->group(function () { /* routes */ }
php artisan serve
поднимает сайт на http://127.0.0.1:8000
- там все работаетhttp://admin.127.0.0.1:800
получаю This site can’t be reached. http://admin.localhost
вижу Index of / и список моих тестовых проектов.MAMP/htdocs
.Route::name() -> Route::domain()
DK
Route::name() -> Route::domain()
А
Route::name('admin.')->group(function () { /* routes */ }
Route::name()
будет группировать роуты по имени, а не домену.DK
Route::name('admin.')->group(function () { /* routes */ }
Route::name()
будет группировать роуты по имени, а не домену.А
DK
SN
ДТ