. */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Webhooks; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Webhook; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\View\View; /** * Class EditController */ class EditController extends Controller { /** * DeleteController constructor. * */ public function __construct() { parent::__construct(); // translations: $this->middleware( function ($request, $next) { app('view')->share('mainTitleIcon', 'fa-bolt'); app('view')->share('subTitleIcon', 'fa-pencil'); app('view')->share('title', (string)trans('firefly.webhooks')); return $next($request); } ); } /** * Delete account screen. * * @param Webhook $webhook * * @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View */ public function index(Webhook $webhook) { $subTitle = (string)trans('firefly.edit_webhook', ['title' => $webhook->title]); $this->rememberPreviousUrl('webhooks.delete.url'); return view('webhooks.edit', compact('webhook', 'subTitle')); } }