1 | <?php namespace Modules\Setting\Http\Controllers\Admin; |
||
9 | class SettingController extends AdminBaseController |
||
10 | { |
||
11 | /** |
||
12 | * @var SettingRepository |
||
13 | */ |
||
14 | private $setting; |
||
15 | /** |
||
16 | * @var Module |
||
17 | */ |
||
18 | private $module; |
||
19 | /** |
||
20 | * @var Store |
||
21 | */ |
||
22 | private $session; |
||
23 | |||
24 | public function __construct(SettingRepository $setting, Store $session) |
||
32 | |||
33 | public function index() |
||
37 | |||
38 | public function store(SettingRequest $request) |
||
39 | { |
||
40 | $this->setting->createOrUpdate($request->all()); |
||
41 | |||
42 | flash(trans('setting::messages.settings saved')); |
||
43 | |||
44 | return redirect()->route('dashboard.module.settings', [$this->session->get('module', 'Core')]); |
||
45 | } |
||
46 | |||
47 | public function getModuleSettings(Module $currentModule) |
||
65 | } |
||
66 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: