FIX: fix creating widgets
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Widgets;
|
||||
|
||||
use App\CMS\Repositories\Widgets\Widget;
|
||||
use App\CMS\Widgets\Exceptions\MissingParameterException;
|
||||
use App\Http\Controllers\Admin\Controller;
|
||||
use App\Http\Requests\NewWidgetRequest;
|
||||
use App\Models\Widgets\Widget;
|
||||
use App\Models\Widgets\WidgetType;
|
||||
use App\CMS\Widgets\Exceptions\MissingParameterException;
|
||||
|
||||
class CreateNewWidget extends Controller
|
||||
{
|
||||
@@ -54,9 +54,9 @@ class CreateNewWidget extends Controller
|
||||
} catch (MissingParameterException $e) {
|
||||
// user omitted some value
|
||||
return $this->invalidWidget($type, $e->getMessage());
|
||||
} catch (\Exception $e) {
|
||||
// something went wrong
|
||||
return $this->invalidWidget($type, trans('admin/widgets.cannotSave', ['exception' => $e->getMessage()]));
|
||||
// } catch (\Exception $e) {
|
||||
// // something went wrong
|
||||
// return $this->invalidWidget($type, trans('admin/widgets.cannotSave', ['exception' => $e->getMessage()]));
|
||||
}
|
||||
|
||||
// redirect with success notification
|
||||
|
||||
Reference in New Issue
Block a user