Open spoutnikfr opened 5 years ago
Me to, on fresh install.
patched with
public function index(SettingRequest $request) { $settings = Setting::all(); return $this->response->setMetaTitle(trans('settings::setting.names')) ->view('settings::index') ->data(compact('settings')) ->output(); }
$settings = Setting::all();
Original:
/**
* Display a list of setting.
*
* @return Response
*/
public function index(SettingRequest $request)
{
return $this->response->setMetaTitle(trans('settings::setting.names'))
->view('settings::index')
->data(compact('settings'))
->output();
}
Fix:
* Display a list of setting.
*
* @return Response
*/
public function index(SettingRequest $request)
{
return $this->response->setMetaTitle(trans('settings::setting.names'))
->view('settings::index')
->data(Setting::all())
->output();
}
I think it has to do with the $request variable. Creating an instance of the SettingRequest class with $request variable seem to return $request instead of $setting variable. Changing the $request variable to $settings variable on the class instance solves the problem.
On fresh install, trying to view Settings directly from menu :
in vendor/lavalite/framework/src/Litepie/Settings/Http/Controllers/SettingResourceController.php