You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation (Usage) is the following code snippet:
namespace App\Whatever\Api\Controllers;
use App\Http\Requests;
use App\User;
use Illuminate\Http\Request;
// Add this line
use Unlu\Laravel\Api\QueryBuilder;
class UsersController extends Controller
{
public function index(Request $request)
{
$queryBuilder = new QueryBuilder(new User, $request);
return response()->json([
'data' => $queryBuilder->build()->paginate(),
.
.
]);
}
}
I had already defined resources for my models. Your code snippet will ignore the resources. Is there a way to use it with my resources? Because in my resources are defined, which data will be showed and i defined custom names for the output.
The text was updated successfully, but these errors were encountered:
In the documentation (Usage) is the following code snippet:
I had already defined resources for my models. Your code snippet will ignore the resources. Is there a way to use it with my resources? Because in my resources are defined, which data will be showed and i defined custom names for the output.
The text was updated successfully, but these errors were encountered: