public function getDetachField($field_id, $ct_id) { $type = ContentType::find($ct_id); $field = Field::find($field_id); $type->fieldable()->detach($field->id); return back()->withMsg("Поле \"{$field->name}\" от материала \"{$type->name}\" успешно отвязано"); }
public function postStore(Request $request) { Field::create($request->all()); return back()->withMsg('Создано'); }