public function add(Request $request)
{
$this->validate($request, ['tid' => 'required|integer', 'name' => 'required|no_special_chars']);
if ($this->closet->add($request->tid, $request->name)) {
$t = Texture::find($request->tid);
$t->likes += 1;
$t->save();
return json(trans('user.closet.add.success', ['name' => $request->input('name')]), 0);
} else {
return json(trans('user.closet.add.repeated'), 1);
}
}