Added Seedbox to API
Added Seedbox to API
This commit is contained in:
parent
ebb8edaac3
commit
e1bbcc3c9f
|
@ -142,6 +142,23 @@ class ApiController extends Controller
|
|||
return response($reseller, 200);
|
||||
}
|
||||
|
||||
protected function getAllSeedbox()
|
||||
{
|
||||
$reseller = DB::table('seedboxes as sb')
|
||||
->Join('pricings as p', 'sb.id', '=', 'p.service_id')
|
||||
->get(['sb.*', 'p.id as price_id', 'p.currency', 'p.price', 'p.term', 'p.as_usd', 'p.usd_per_month', 'p.next_due_date'])->toJson(JSON_PRETTY_PRINT);
|
||||
return response($reseller, 200);
|
||||
}
|
||||
|
||||
protected function getSeedbox($id)
|
||||
{
|
||||
$reseller = DB::table('seedboxes as sb')
|
||||
->Join('pricings as p', 'sb.id', '=', 'p.service_id')
|
||||
->where('sb.id', '=', $id)
|
||||
->get(['sb.*', 'p.id as price_id', 'p.currency', 'p.price', 'p.term', 'p.as_usd', 'p.usd_per_month', 'p.next_due_date'])->toJson(JSON_PRETTY_PRINT);
|
||||
return response($reseller, 200);
|
||||
}
|
||||
|
||||
protected function getAllDomains()
|
||||
{
|
||||
$domains = DB::table('domains as d')
|
||||
|
|
|
@ -55,6 +55,9 @@ Route::middleware('auth:api')->get('providers/{id}', 'App\Http\Controllers\ApiCo
|
|||
Route::middleware('auth:api')->get('reseller/', 'App\Http\Controllers\ApiController@getAllReseller');
|
||||
Route::middleware('auth:api')->get('reseller/{id}', 'App\Http\Controllers\ApiController@getReseller');
|
||||
|
||||
Route::middleware('auth:api')->get('seedbox/', 'App\Http\Controllers\ApiController@getAllSeedbox');
|
||||
Route::middleware('auth:api')->get('seedbox/{id}', 'App\Http\Controllers\ApiController@getSeedbox');
|
||||
|
||||
Route::middleware('auth:api')->get('settings/', 'App\Http\Controllers\ApiController@getAllSettings');
|
||||
|
||||
Route::middleware('auth:api')->get('shared/', 'App\Http\Controllers\ApiController@getAllShared');
|
||||
|
|
Loading…
Reference in New Issue
Block a user