Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-the-Diamond authored and github-actions[bot] committed Jul 4, 2024
1 parent f26a61d commit 9643dd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use App\Http\Controllers\Controller;
use Moox\Notification\Models\Notification;
use Illuminate\Http\Request;


class NotificationController extends Controller
{
Expand All @@ -16,19 +14,19 @@ class NotificationController extends Controller
public function index()
{
$notifications = Notification::all();

return response()->json([
'notifications' => $notifications
],200,[],JSON_PRETTY_PRINT);
'notifications' => $notifications,
], 200, [], JSON_PRETTY_PRINT);
}

/**
/**
* Display Notification by UserId
*/
public function getView($user)
{
$notifications = Notification::where('notifiable_id',$user)->count();
$notifications = Notification::where('notifiable_id', $user)->count();

return view('notifications::notificationBell',['unreadNotificationsCount'=>$notifications]);
return view('notifications::notificationBell', ['unreadNotificationsCount' => $notifications]);
}

}
7 changes: 3 additions & 4 deletions packages/notifications/src/NotificationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

namespace Moox\Notification;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Spatie\LaravelPackageTools\Package;
use Moox\Notification\Commands\InstallCommand;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Moox\Notification\Http\Controllers\NotificationController;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

class NotificationServiceProvider extends PackageServiceProvider
{
Expand All @@ -26,7 +25,7 @@ public function configurePackage(Package $package): void

public function packageRegistered()
{
if(config('notifications.api')){
if (config('notifications.api')) {
Route::get('/api/notifications/user/{user}/notificationBell', [NotificationController::class, 'getView']);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function table(Table $table): Table
TextColumn::make('type'),
TextColumn::make('notifiable_type'),
TextColumn::make('notifiable_id')
->sortable(),
->sortable(),
TextColumn::make('data'),
TextColumn::make('read_at'),

Expand Down

0 comments on commit 9643dd2

Please sign in to comment.