. */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Webhooks; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Webhook; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Support\Facades\Log; /** * Class EditController */ class EditController extends Controller { /** * DeleteController constructor. */ public function __construct() { parent::__construct(); // translations: $this->middleware( static 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. * * @return Application|Factory|View */ public function index(Webhook $webhook) { Log::channel('audit')->info('User visits webhook edit page.'); $subTitle = (string)trans('firefly.edit_webhook', ['title' => $webhook->title]); $this->rememberPreviousUrl('webhooks.edit.url'); return view('webhooks.edit', compact('webhook', 'subTitle')); } }