CustomMsgSwitchTransformer.php 820 B

1234567891011121314151617
  1. <?php
  2. namespace App\Http\Controllers\Channel\OfficialAccount\Transformers;
  3. class CustomMsgSwitchTransformer
  4. {
  5. public function transform($customMsgSwitchMsgs){
  6. return [
  7. 'title' => isset($customMsgSwitchMsgs->customMsgSwitchs->title) ? $customMsgSwitchMsgs->customMsgSwitchs->title : "",
  8. 'custom_category' => isset($customMsgSwitchMsgs->custom_category) ? $customMsgSwitchMsgs->custom_category : "",
  9. 'status' => isset($customMsgSwitchMsgs->status) ? $customMsgSwitchMsgs->status : "",
  10. 'distribution_channel_id' => isset($customMsgSwitchMsgs->distribution_channel_id) ? $customMsgSwitchMsgs->distribution_channel_id : "",
  11. 'id' => isset($customMsgSwitchMsgs->id) ? $customMsgSwitchMsgs->id : "",
  12. ];
  13. }
  14. }