mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
tag add more customized options + NexusDB::rememter()
This commit is contained in:
@@ -46,10 +46,7 @@ class TagController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate($this->getRules());
|
||||
$data = $request->all();
|
||||
if (isset($data['priority'])) {
|
||||
$data['priority'] = intval($data['priority']);
|
||||
}
|
||||
$data = array_filter($request->all());
|
||||
$result = $this->repository->store($data);
|
||||
$resource = new TagResource($result);
|
||||
return $this->success($resource);
|
||||
|
||||
@@ -18,6 +18,11 @@ class TagResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'color' => $this->color,
|
||||
'font_color' => $this->font_color,
|
||||
'font_size' => $this->font_size,
|
||||
'padding' => $this->padding,
|
||||
'margin' => $this->margin,
|
||||
'border_radius' => $this->border_radius,
|
||||
'priority' => $this->priority,
|
||||
'created_at' => format_datetime($this->created_at),
|
||||
'updated_at' => format_datetime($this->updated_at),
|
||||
|
||||
Reference in New Issue
Block a user