Support the ongoing development of Laravel.io →
Requests Input

I'm creating an API in which routes are already made like:

Route::post('/keyword/{keyword}/{page?}', array(
	'uses' => 'KeywordController@anyIndex'
));

But I'm using cURL to acces it by using http://localhost/api.com/public/account and the route

Route::get('/account', array(
	'uses' => 'AccountController@anyIndex'
));

Which shows the index of http://localhost/api.com/public/keyword/ajax due to

curl_setopt($curl_handle, CURLOPT_URL, 'http://localhost/api.expoza.com/public/keyword/ajax');

How do I get it to work so I can use it as: http://localhost/api.com/public/account/keyword/ajax

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

AlessioJ alessioj Joined 28 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.