. */ namespace App\Http\Controllers\Api\Admin; use App\Http\Controllers\Controller; use App\Http\Requests\ExternalAccount\CreateUpdate; use App\Services\AccountService; use Illuminate\Http\Request; use Illuminate\Validation\Rule; use App\ExternalAccount; use App\Account; class ExternalAccountController extends Controller { public function show(int $accountId) { return Account::findOrFail($accountId)->external()->firstOrFail(); } public function store(CreateUpdate $request, int $accountId) { return (new AccountService)->storeExternalAccount($request, $accountId); } public function destroy(int $accountId) { return (new AccountService)->deleteExternalAccount($accountId); } }