mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Code cleanup
This commit is contained in:
@@ -44,8 +44,8 @@ class CreateController extends Controller
|
||||
static function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-bolt');
|
||||
app('view')->share('subTitleIcon', 'fa-plus');
|
||||
app('view')->share('title', (string)trans('firefly.webhooks'));
|
||||
app('view')->share('subTitle', (string)trans('firefly.create_new_webhook'));
|
||||
app('view')->share('title', (string) trans('firefly.webhooks'));
|
||||
app('view')->share('subTitle', (string) trans('firefly.create_new_webhook'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ class DeleteController extends Controller
|
||||
static function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-bolt');
|
||||
app('view')->share('subTitleIcon', 'fa-trash');
|
||||
app('view')->share('title', (string)trans('firefly.webhooks'));
|
||||
app('view')->share('subTitle', (string)trans('firefly.delete_webhook'));
|
||||
app('view')->share('title', (string) trans('firefly.webhooks'));
|
||||
app('view')->share('subTitle', (string) trans('firefly.delete_webhook'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class DeleteController extends Controller
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook delete page.');
|
||||
$subTitle = (string)trans('firefly.delete_webhook', ['title' => $webhook->title]);
|
||||
$subTitle = (string) trans('firefly.delete_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.delete.url');
|
||||
|
||||
return view('webhooks.delete', compact('webhook', 'subTitle'));
|
||||
|
||||
@@ -49,7 +49,7 @@ class EditController extends Controller
|
||||
static function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-bolt');
|
||||
app('view')->share('subTitleIcon', 'fa-pencil');
|
||||
app('view')->share('title', (string)trans('firefly.webhooks'));
|
||||
app('view')->share('title', (string) trans('firefly.webhooks'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class EditController extends Controller
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook edit page.');
|
||||
$subTitle = (string)trans('firefly.edit_webhook', ['title' => $webhook->title]);
|
||||
$subTitle = (string) trans('firefly.edit_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.edit.url');
|
||||
|
||||
return view('webhooks.edit', compact('webhook', 'subTitle'));
|
||||
|
||||
@@ -43,7 +43,7 @@ class IndexController extends Controller
|
||||
$this->middleware(
|
||||
static function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-bolt');
|
||||
app('view')->share('title', (string)trans('firefly.webhooks'));
|
||||
app('view')->share('title', (string) trans('firefly.webhooks'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class ShowController extends Controller
|
||||
static function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-bolt');
|
||||
app('view')->share('subTitleIcon', 'fa-bolt');
|
||||
app('view')->share('title', (string)trans('firefly.webhooks'));
|
||||
app('view')->share('title', (string) trans('firefly.webhooks'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class ShowController extends Controller
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page.', $webhook->id));
|
||||
$subTitle = (string)trans('firefly.show_webhook', ['title' => $webhook->title]);
|
||||
$subTitle = (string) trans('firefly.show_webhook', ['title' => $webhook->title]);
|
||||
|
||||
return view('webhooks.show', compact('webhook', 'subTitle'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user