When I add Route::resource('api', 'ApiController');
to my app/Http/routes.php, I get this error:
BadMethodCallException Method [index] does not exist.
My api controller looks like this:
<?php
class ApiController extends BaseController
{
public function getIndex()
{
echo "No Access";
}
public function postIndex()
{
// content here ...
}
public function check_ban($user, $gameBit, $ip)
{
// content here ...
}
public function check_balance($userid, $gameid, $serverid)
{
// content here ...
}
public function purchase_item($xml)
{
// content here ...
}
public function LoginRequest($xml)
{
// content here ...
}
public function CurrencyRequest($xml)
{
// content here ...
}
public function ItemPurchaseRequest($xml)
{
// content here ...
}
}
My api should handle out game login request, buying items, ban check and so on, but I get the error described above.
How do I resolve it please?