FEATURE #1451: add logging to all actions in widget management
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Models\Widget;
|
||||
use App\Models\WidgetType;
|
||||
use App\Widgets\Exceptions\MissingParameterException;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class CreateNewWidget extends Controller
|
||||
{
|
||||
@@ -65,6 +66,9 @@ class CreateNewWidget extends Controller
|
||||
// save into database
|
||||
$widget->save();
|
||||
|
||||
// fire event with newly created widget
|
||||
Event::fire(new \App\Events\CreateNewWidget($widget));
|
||||
|
||||
// redirect with success notification
|
||||
return redirect()
|
||||
->route('widgets.new', ['type' => $type])
|
||||
|
||||
Reference in New Issue
Block a user