(int)$model->id, 'day' => $model->day, 'week' => $model->week, 'time' => $model->time, 'week_index' => $model->week_index, 'room' => $model->room, 'maintain_admin' => $model->maintain_admin, 'admin' => $model->admin, // 'body' => $model->body, 'status' => $model->status, 'created_at' => $model->created_at->format(Carbon::DEFAULT_TO_STRING_FORMAT), 'updated_at' => $model->updated_at->format(Carbon::DEFAULT_TO_STRING_FORMAT) ]; } public function detail($model) { return [ 'id' => (int)$model->id, 'day' => $model->day, 'week' => $model->week, 'time' => $model->time, 'week_index' => $model->week_index, 'maintain_admin' => $model->maintain_admin, 'room' => $model->room, 'admin' => $model->admin, 'body' => $model->body, 'status' => $model->status, 'created_at' => $model->created_at->format(Carbon::DEFAULT_TO_STRING_FORMAT), 'updated_at' => $model->updated_at->format(Carbon::DEFAULT_TO_STRING_FORMAT) ]; } }