app/Http/Controllers/API/SlangsController.php
<?php
namespace Kallun\Http\Controllers\API;
use Illuminate\Http\Request;
use Kallun\Http\Controllers\Controller;
use Kallun\Http\Resources\SlangCollection as Slangs;
use Kallun\Models\Slang;
class SlangsController extends Controller
{
//
public function getAllSlangs()
{
return new Slangs(Slang::paginate(20));
}
}