本文整理汇总了PHP中app\Setting::getTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getTable方法的具体用法?PHP Setting::getTable怎么用?PHP Setting::getTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Setting
的用法示例。
在下文中一共展示了Setting::getTable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Setting $setting)
{
$this->validate($request, ['who_can_see_my_skills' => 'required|in:' . join(",", Setting::$options), 'who_can_see_who_i_am_following' => 'required|in:' . join(",", Setting::$options)]);
\ChromePhp::log($setting->getTable());
$this->authorize('owns', $setting);
$setting->who_can_see_my_skills = $request->who_can_see_my_skills;
$setting->who_can_see_who_i_am_following = $request->who_can_see_who_i_am_following;
$setting->save();
return "Settings updated.";
}