iam build two websites using Laravel 5.4 and using Ixudra/Curl libary.
I have 2 virtual host domains in my localhost:
one.dev
two.dev
i have a url in two.dev: http://ift.tt/2o61LzU
/* It have query to get user balance with ID=1 */
User_balance::where('id',Request()->balance)->pluck('balance')->first();
if i accessing that url via browser, it will give success result :
{"Version":"V1","Protocol":"HTTP","Path":"server","Method":"GET","UsingAuth":"false","ErrorStatus":0,"Message":"","Data":{"balance":"4.00"}}
Than in one.dev
, i make a curl request to above url like this below:
$response = Curl::to('http://two.dev/server')
->withData(['balance'=>1])
->get();
return $response;
and the result is error like below:
PDOException in Connection.php line 319:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause'
QueryException in Connection.php line 647:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select `balance` from `user_balances` where `id` = 1 limit 1)
As if the laravel-query in the function-controller in two.dev is not working. Can someone help me to resolve this?
Thank you so much.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ofC8cW
via IFTTT
Thanks for sharing with us that awesome article you have amazing blog..............
RépondreSupprimerWeb Designing Training in Chennai
Web Designing Course in Chennai
Web Designing Training in Bangalore
Web Designing Course in Bangalore
Web Designing Training in Hyderabad
Web Designing Course in Hyderabad
Web Designing Training in Coimbatore
Web Designing Training
Web Designing Online Training