Closed bolechen closed 3 years ago
here is the debug info
Environment: production Debug: OFF Horizon: Active Queue connection: OK Webhooks: 11 unprocessed webhooks Schedule: ran 0 minute(s) ago Default mailer: smtp Mailcoach mailer: null Campaign mailer: null Transactional mailer: null
App directory: /home/forge/dm.nanrenwa.com User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.20 Safari/537.36 PHP version: 7.4.11 MySQL version: 5.7.26-log Laravel version: 8.10.0 Horizon version: v5.2.1@8fbe70580d653e0f5c33ed9b151f6eebc16dfbf2 laravel-mailcoach version: 3.2.3 mailcoach-ui version: 1.0.3
Could you check and make sure this line is set to sanctum
in your project? https://github.com/spatie/Mailcoach/blob/master/config/mailcoach.php#L135
Could you check and make sure this line is set to
sanctum
in your project? https://github.com/spatie/Mailcoach/blob/master/config/mailcoach.php#L135
yes have this
Which endpoint are you trying?
Which endpoint are you trying?
i test with curl
the server error log is
Oct 19 15:45:08 taobao [2020-10-19 07:45:08] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'api_token' in 'where clause' (SQL: select * from `users` where `api_token` = 2|R1EB2Gi6QyonWBDaUz1UcbNL0YI3wfRUZrTsANGd limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'api_token' in 'where clause' (SQL: select * from `users` where `api_token` = 2|R1EB2Gi6QyonWBDaUz1UcbNL0YI3wfRUZrTsANGd limit 1) at /home/forge/dm.nanrenwa.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671)
Mailcoach uses job batching under the hood. Make sure you add the required database table, as mentioned in the Laravel docs on Job batching.
try to run
php artisan queue:batches-table
php artisan migrate
@bolechen There is a conflict with the route in routes/api.php
, remove the route there and the Mailcoach API should work.
I installed new mailcoach app in my server via
After config, the ui worked all good, But when i call with api, it always return 500 error, the error log have some contents below, and a saw my mysql database table, users tables do not have the
api_token
column.Where am i wrong?