Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 99aac925
authored
Sep 08, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20794 Сделать чтобы в целевых РК оставалась одна карточка (Логирование)
1 parent
e1e10193
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
171 additions
and
18 deletions
app/Models/Pivots/GoalRetargetinglist.php
app/Models/YandexError.php
app/Service/Requests/Direct/AddAds.php
app/Service/Requests/Direct/AddKeywords.php
app/Service/Requests/Direct/AddRetargetinglists.php
app/Service/Requests/Direct/DeleteAds.php
app/Service/Requests/Direct/DeleteKeywords.php
app/Service/Requests/Direct/UpdateAds.php
app/Service/Requests/Direct/UpdateKeywords.php
app/Service/Requests/Direct/UpdateRetargetinglists.php
database/migrations/2021_09_07_091521_create_yandex_errors_table.php
app/Models/Pivots/GoalRetargetinglist.php
View file @
99aac92
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Models\Pivots
;
namespace
App\Models\Pivots
;
use
App\Models\Retargetinglist
;
use
App\Models\Retargetinglist
;
use
App\Models\YandexError
;
use
Illuminate\Database\Eloquent\Builder
;
use
Illuminate\Database\Eloquent\Builder
;
use
Illuminate\Database\Eloquent\Relations\Pivot
;
use
Illuminate\Database\Eloquent\Relations\Pivot
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
...
@@ -104,4 +105,9 @@ class GoalRetargetinglist extends Pivot
...
@@ -104,4 +105,9 @@ class GoalRetargetinglist extends Pivot
return
$this
->
hasMany
(
GoalAudienceTarget
::
class
,
'goal_retargetinglist_id'
);
return
$this
->
hasMany
(
GoalAudienceTarget
::
class
,
'goal_retargetinglist_id'
);
}
}
public
function
errors
()
{
return
$this
->
morphMany
(
YandexError
::
class
,
'cause'
);
}
}
}
app/Models/YandexError.php
View file @
99aac92
...
@@ -14,9 +14,17 @@ class YandexError extends Model
...
@@ -14,9 +14,17 @@ class YandexError extends Model
'token_id'
,
'token_id'
,
'cause_type'
,
'cause_type'
,
'cause_id'
,
'cause_id'
,
'service'
,
'method'
,
'params'
,
'errors'
,
'errors'
,
];
];
protected
$casts
=
[
'params'
=>
'json'
,
'errors'
=>
'array'
,
];
public
function
token
()
public
function
token
()
{
{
return
$this
->
belongsTo
(
Tokens
::
class
,
'token_id'
);
return
$this
->
belongsTo
(
Tokens
::
class
,
'token_id'
);
...
...
app/Service/Requests/Direct/AddAds.php
View file @
99aac92
...
@@ -59,6 +59,8 @@ class AddAds extends DirectRequest
...
@@ -59,6 +59,8 @@ class AddAds extends DirectRequest
/* @var $goalAd GoalAdvertisement|Advertisement|\stdClass */
/* @var $goalAd GoalAdvertisement|Advertisement|\stdClass */
$goalAd
=
$this
->
goalAds
->
get
(
$key
);
$goalAd
=
$this
->
goalAds
->
get
(
$key
);
$data
=
$this
->
getParams
()[
'Ads'
][
$key
];
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
if
(
...
@@ -116,7 +118,10 @@ class AddAds extends DirectRequest
...
@@ -116,7 +118,10 @@ class AddAds extends DirectRequest
}
elseif
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
}
elseif
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
$goalAd
->
errors
()
->
create
([
$goalAd
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'errors'
=>
$add_result
[
'Errors'
]
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$add_result
[
'Errors'
],
]);
]);
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
...
@@ -130,7 +135,7 @@ class AddAds extends DirectRequest
...
@@ -130,7 +135,7 @@ class AddAds extends DirectRequest
Log
::
debug
(
"AddAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"AddAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$
this
->
getParams
()[
'Ads'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
->
update
([
->
update
([
...
...
app/Service/Requests/Direct/AddKeywords.php
View file @
99aac92
...
@@ -59,6 +59,8 @@ class AddKeywords extends DirectRequest
...
@@ -59,6 +59,8 @@ class AddKeywords extends DirectRequest
$goalKeyword
=
$this
->
goalKeywords
[
$key
];
$goalKeyword
=
$this
->
goalKeywords
[
$key
];
$data
=
$this
->
getParams
()[
'Keywords'
][
$key
];
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
if
(
...
@@ -80,11 +82,23 @@ class AddKeywords extends DirectRequest
...
@@ -80,11 +82,23 @@ class AddKeywords extends DirectRequest
}
}
continue
;
continue
;
}
elseif
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
$goalKeyword
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$add_result
[
'Errors'
],
]);
$goalKeyword
->
update
([
'reserve_create_at'
=>
null
,
]);
continue
;
}
}
Log
::
debug
(
"AddKeywords, empty Id"
);
Log
::
debug
(
"AddKeywords, empty Id"
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$
this
->
getParams
()[
'Keywords'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalKeyword
::
whereId
(
$goalKeyword
->
id
)
GoalKeyword
::
whereId
(
$goalKeyword
->
id
)
->
update
([
->
update
([
...
...
app/Service/Requests/Direct/AddRetargetinglists.php
View file @
99aac92
...
@@ -57,10 +57,31 @@ class AddRetargetinglists extends DirectRequest
...
@@ -57,10 +57,31 @@ class AddRetargetinglists extends DirectRequest
$goalRetargetinglist
=
$this
->
goalRetargetinglists
->
get
(
$key
);
$goalRetargetinglist
=
$this
->
goalRetargetinglists
->
get
(
$key
);
$data
=
$this
->
getParams
()[
'RetargetingLists'
][
$key
];
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
$goalRetargetinglist
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$add_result
[
'Errors'
],
]);
GoalRetargetinglist
::
whereId
(
$goalRetargetinglist
->
id
)
->
update
([
'reserve_create_at'
=>
null
,
]);
continue
;
}
Log
::
debug
(
"AddRetargetinglist, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"AddRetargetinglist, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$
this
->
getParams
()[
'RetargetingLists'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalRetargetinglist
::
where
(
'id'
,
$goalRetargetinglist
->
getKey
())
GoalRetargetinglist
::
where
(
'id'
,
$goalRetargetinglist
->
getKey
())
->
update
([
->
update
([
...
...
app/Service/Requests/Direct/DeleteAds.php
View file @
99aac92
...
@@ -40,6 +40,8 @@ class DeleteAds extends DirectRequest
...
@@ -40,6 +40,8 @@ class DeleteAds extends DirectRequest
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
$external_id
=
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
];
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
if
(
...
@@ -48,8 +50,6 @@ class DeleteAds extends DirectRequest
...
@@ -48,8 +50,6 @@ class DeleteAds extends DirectRequest
$delete_result
[
'Errors'
][
0
][
'Code'
]
==
8800
$delete_result
[
'Errors'
][
0
][
'Code'
]
==
8800
)
{
)
{
if
(
$external_id
=
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]){
if
(
$this
->
getToken
()
->
isMain
())
{
if
(
$this
->
getToken
()
->
isMain
())
{
Advertisement
::
needDeleted
()
Advertisement
::
needDeleted
()
->
where
(
'external_id'
,
$external_id
)
->
where
(
'external_id'
,
$external_id
)
...
@@ -62,12 +62,27 @@ class DeleteAds extends DirectRequest
...
@@ -62,12 +62,27 @@ class DeleteAds extends DirectRequest
continue
;
continue
;
}
elseif
(
isset
(
$delete_result
[
'Errors'
])
&&
count
(
$delete_result
[
'Errors'
]))
{
$goalAd
=
GoalAdvertisement
::
whereExternalId
(
$external_id
)
->
first
();
if
(
$goalAd
)
{
$goalAd
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$external_id
,
'errors'
=>
$delete_result
[
'Errors'
],
]);
$goalAd
->
update
([
'reserve_delete_at'
=>
null
,
]);
continue
;
}
}
}
}
Log
::
debug
(
"DeleteAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"DeleteAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$delete_result
);
Log
::
debug
(
$delete_result
);
$external_id
=
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
];
Log
::
debug
(
$external_id
);
Log
::
debug
(
$external_id
);
if
(
$this
->
getToken
()
->
isMain
())
{
if
(
$this
->
getToken
()
->
isMain
())
{
...
...
app/Service/Requests/Direct/DeleteKeywords.php
View file @
99aac92
...
@@ -38,16 +38,36 @@ class DeleteKeywords extends DirectRequest
...
@@ -38,16 +38,36 @@ class DeleteKeywords extends DirectRequest
}
}
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
$external_id
=
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
];
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
isset
(
$delete_result
[
'Errors'
])
&&
count
(
$delete_result
[
'Errors'
]))
{
$goalKeyword
=
GoalKeyword
::
whereExternalId
(
$external_id
)
->
first
();
if
(
$goalKeyword
)
{
$goalKeyword
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$external_id
,
'errors'
=>
$delete_result
[
'Errors'
],
]);
$goalKeyword
->
update
([
'reserve_update_at'
=>
null
,
]);
continue
;
}
}
Log
::
debug
(
"DeleteKeywords, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"DeleteKeywords, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$delete_result
);
Log
::
debug
(
$delete_result
);
Log
::
debug
(
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]);
if
(
$delete_result
[
'Errors'
][
0
][
'Code'
]
==
8800
){
if
(
$delete_result
[
'Errors'
][
0
][
'Code'
]
==
8800
){
//объекта по какой то причине нет
//объекта по какой то причине нет
if
(
$external_id
=
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]){
GoalKeyword
::
where
(
'external_id'
,
$external_id
)
->
delete
();
GoalKeyword
::
where
(
'external_id'
,
$external_id
)
->
delete
();
}
}
}
continue
;
continue
;
}
}
...
...
app/Service/Requests/Direct/UpdateAds.php
View file @
99aac92
...
@@ -42,10 +42,13 @@ class UpdateAds extends DirectRequest
...
@@ -42,10 +42,13 @@ class UpdateAds extends DirectRequest
}
}
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
$data
=
$this
->
getParams
()[
'Ads'
][
$key
];
if
(
!
isset
(
$update_result
[
'Id'
]))
{
if
(
!
isset
(
$update_result
[
'Id'
]))
{
if
(
isset
(
$update_result
[
'Errors'
][
0
][
'Details'
])
&&
$update_result
[
'Errors'
][
0
][
'Details'
]
===
'You cannot update an archived ad'
)
{
if
(
isset
(
$update_result
[
'Errors'
][
0
][
'Details'
])
&&
$update_result
[
'Errors'
][
0
][
'Details'
]
===
'You cannot update an archived ad'
)
{
GoalAdvertisement
::
whereExternalId
(
$
this
->
getParams
()[
'Ads'
][
$key
]
[
'Id'
])
GoalAdvertisement
::
whereExternalId
(
$
data
[
'Id'
])
->
update
([
->
update
([
'deleted_need'
=>
Carbon
::
now
(),
'deleted_need'
=>
Carbon
::
now
(),
'archived_need'
=>
null
,
'archived_need'
=>
null
,
...
@@ -54,20 +57,36 @@ class UpdateAds extends DirectRequest
...
@@ -54,20 +57,36 @@ class UpdateAds extends DirectRequest
]);
]);
continue
;
continue
;
}
elseif
(
isset
(
$update_result
[
'Errors'
][
0
][
'Details'
])
&&
$update_result
[
'Errors'
][
0
][
'Details'
]
===
'Ad not found'
)
{
}
elseif
(
isset
(
$update_result
[
'Errors'
][
0
][
'Details'
])
&&
$update_result
[
'Errors'
][
0
][
'Details'
]
===
'Ad not found'
)
{
GoalAdvertisement
::
whereExternalId
(
$
this
->
getParams
()[
'Ads'
][
$key
]
[
'Id'
])
GoalAdvertisement
::
whereExternalId
(
$
data
[
'Id'
])
->
update
([
->
update
([
'reserve_update_at'
=>
null
,
'reserve_update_at'
=>
null
,
]);
]);
GoalAdvertisement
::
whereExternalId
(
$
this
->
getParams
()[
'Ads'
][
$key
]
[
'Id'
])
GoalAdvertisement
::
whereExternalId
(
$
data
[
'Id'
])
->
delete
();
->
delete
();
continue
;
continue
;
}
elseif
(
isset
(
$update_result
[
'Errors'
])
&&
count
(
$update_result
[
'Errors'
]))
{
$goalAd
=
GoalAdvertisement
::
whereExternalId
(
$data
[
'Id'
])
->
first
();
if
(
$goalAd
)
{
$goalAd
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$update_result
[
'Errors'
],
]);
$goalAd
->
update
([
'reserve_update_at'
=>
null
,
]);
continue
;
}
}
}
Log
::
debug
(
"UpdateAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"UpdateAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$
this
->
getParams
()[
'Ads'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalAdvertisement
::
whereExternalId
(
$
this
->
getParams
()[
'Ads'
][
$key
]
[
'Id'
])
GoalAdvertisement
::
whereExternalId
(
$
data
[
'Id'
])
->
update
([
->
update
([
'reserve_update_at'
=>
null
,
'reserve_update_at'
=>
null
,
]);
]);
...
...
app/Service/Requests/Direct/UpdateKeywords.php
View file @
99aac92
...
@@ -42,11 +42,32 @@ class UpdateKeywords extends DirectRequest
...
@@ -42,11 +42,32 @@ class UpdateKeywords extends DirectRequest
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
if
(
!
isset
(
$update_result
[
'Id'
]))
{
if
(
!
isset
(
$update_result
[
'Id'
]))
{
$data
=
$this
->
getParams
()[
'Keywords'
][
$key
];
if
(
isset
(
$update_result
[
'Errors'
])
&&
count
(
$update_result
[
'Errors'
]))
{
$goalKeyword
=
GoalKeyword
::
whereExternalId
(
$data
[
'Id'
])
->
first
();
if
(
$goalKeyword
)
{
$goalKeyword
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$update_result
[
'Errors'
],
]);
$goalKeyword
->
update
([
'reserve_update_at'
=>
null
,
]);
continue
;
}
}
Log
::
debug
(
"UpdateKeywords, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"UpdateKeywords, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$
this
->
getParams
()[
'Keywords'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalKeyword
::
whereExternalId
(
$
this
->
getParams
()[
'Keywords'
][
$key
]
[
'Id'
])
GoalKeyword
::
whereExternalId
(
$
data
[
'Id'
])
->
update
([
->
update
([
'reserve_update_at'
=>
null
,
'reserve_update_at'
=>
null
,
]);
]);
...
...
app/Service/Requests/Direct/UpdateRetargetinglists.php
View file @
99aac92
...
@@ -43,12 +43,33 @@ class UpdateRetargetinglists extends DirectRequest
...
@@ -43,12 +43,33 @@ class UpdateRetargetinglists extends DirectRequest
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
foreach
(
$response
[
'result'
][
'UpdateResults'
]
as
$key
=>
$update_result
)
{
$data
=
$this
->
getParams
()[
'RetargetingLists'
][
$key
];
if
(
!
isset
(
$update_result
[
'Id'
]))
{
if
(
!
isset
(
$update_result
[
'Id'
]))
{
if
(
isset
(
$update_result
[
'Errors'
])
&&
count
(
$update_result
[
'Errors'
]))
{
$goalRetargetinglist
=
GoalRetargetinglist
::
whereExternalId
(
$data
[
'Id'
])
->
first
();
if
(
$goalRetargetinglist
)
{
$goalRetargetinglist
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'errors'
=>
$update_result
[
'Errors'
],
]);
$goalRetargetinglist
->
update
([
'reserve_update_at'
=>
null
,
]);
continue
;
}
}
Log
::
debug
(
"AddRetargetinglist, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"AddRetargetinglist, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$update_result
);
Log
::
debug
(
$
this
->
getParams
()[
'RetargetingLists'
][
$key
]
);
Log
::
debug
(
$
data
);
GoalRetargetinglist
::
where
(
'external_id'
,
$
this
->
getParams
()[
'RetargetingLists'
][
$key
]
[
'Id'
])
GoalRetargetinglist
::
where
(
'external_id'
,
$
data
[
'Id'
])
->
update
([
->
update
([
'reserve_update_at'
=>
null
,
'reserve_update_at'
=>
null
,
]);
]);
...
...
database/migrations/2021_09_07_091521_create_yandex_errors_table.php
View file @
99aac92
...
@@ -18,6 +18,9 @@ class CreateYandexErrorsTable extends Migration
...
@@ -18,6 +18,9 @@ class CreateYandexErrorsTable extends Migration
$table
->
bigInteger
(
'token_id'
)
->
unsigned
();
$table
->
bigInteger
(
'token_id'
)
->
unsigned
();
$table
->
morphs
(
'cause'
);
$table
->
morphs
(
'cause'
);
$table
->
string
(
'service'
);
$table
->
string
(
'method'
);
$table
->
json
(
'params'
);
$table
->
json
(
'errors'
);
$table
->
json
(
'errors'
);
$table
->
foreign
(
'token_id'
)
->
references
(
'id'
)
->
on
(
'tokens'
)
$table
->
foreign
(
'token_id'
)
->
references
(
'id'
)
->
on
(
'tokens'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment