mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 17:30:27 -05:00
update: UNIT3D linting
- github action updated with new ruleset in pint.json - codebase linted with new ruleset - contributors can now run `./vendor/bin/pint` - action workflow will auto correct any lint issues upon commit/opened pull request
This commit is contained in:
@@ -27,7 +27,7 @@ class NotificationController extends Controller
|
||||
*/
|
||||
public function index(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
return \view('user.notification.index');
|
||||
return view('user.notification.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,8 +38,8 @@ class NotificationController extends Controller
|
||||
$notification = $request->user()->notifications()->findOrFail($id);
|
||||
$notification->markAsRead();
|
||||
|
||||
return \redirect()->to($notification->data['url'])
|
||||
->withSuccess(\trans('notification.marked-read'));
|
||||
return redirect()->to($notification->data['url'])
|
||||
->withSuccess(trans('notification.marked-read'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,20 +49,20 @@ class NotificationController extends Controller
|
||||
{
|
||||
$notification = $request->user()->notifications()->where('id', '=', $id)->first();
|
||||
|
||||
if (! $notification) {
|
||||
return \to_route('notifications.index')
|
||||
->withErrors(\trans('notification.not-existent'));
|
||||
if ( ! $notification) {
|
||||
return to_route('notifications.index')
|
||||
->withErrors(trans('notification.not-existent'));
|
||||
}
|
||||
|
||||
if ($notification->read_at != null) {
|
||||
return \to_route('notifications.index')
|
||||
->withErrors(\trans('notification.already-marked-read'));
|
||||
return to_route('notifications.index')
|
||||
->withErrors(trans('notification.already-marked-read'));
|
||||
}
|
||||
|
||||
$notification->markAsRead();
|
||||
|
||||
return \to_route('notifications.index')
|
||||
->withSuccess(\trans('notification.marked-read'));
|
||||
return to_route('notifications.index')
|
||||
->withSuccess(trans('notification.marked-read'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,8 +75,8 @@ class NotificationController extends Controller
|
||||
$carbon = new Carbon();
|
||||
$request->user()->unreadNotifications()->update(['read_at' => $carbon]);
|
||||
|
||||
return \to_route('notifications.index')
|
||||
->withSuccess(\trans('notification.all-marked-read'));
|
||||
return to_route('notifications.index')
|
||||
->withSuccess(trans('notification.all-marked-read'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,8 +86,8 @@ class NotificationController extends Controller
|
||||
{
|
||||
$request->user()->notifications()->findOrFail($id)->delete();
|
||||
|
||||
return \to_route('notifications.index')
|
||||
->withSuccess(\trans('notification.deleted'));
|
||||
return to_route('notifications.index')
|
||||
->withSuccess(trans('notification.deleted'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,7 +97,7 @@ class NotificationController extends Controller
|
||||
{
|
||||
$request->user()->notifications()->delete();
|
||||
|
||||
return \to_route('notifications.index')
|
||||
->withSuccess(\trans('notification.all-deleted'));
|
||||
return to_route('notifications.index')
|
||||
->withSuccess(trans('notification.all-deleted'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user