-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I'm using a REST API that is a little unusual (a mix of GET and POST params - we have no control over the API unfortunately), so I need to make some amends to how Trucker hits it for certain requests.
The problem is that I'm unsure how to check what URL Trucker is hitting.
I'm using the following code inside a model:
<?php
namespace App\Models\Api;
use App\Models\Api\ApiModel;
use Trucker\Facades\ConditionFactory;
class VehicleManufacturer extends ApiModel
{
protected $uri = "manufacturers";
static function whereSlug($slug) {
$conditions = ConditionFactory::build();
$conditions->addCondition('makeSlug', '=', $slug);
$conditions->setLogicalOperator($conditions->getLogicalOperatorAnd());
$results = VehicleManufacturer::all($conditions);
dd($results);
return $results;
}
}
How would I get the URL here?
I know I can get getURI() on a model instance, but I'm not sure how to do it on an all() call, which includes the conditions (which is what I'm interested in).
Metadata
Metadata
Assignees
Labels
No labels