Upload beautify
This commit is contained in:
27
app/Http/Controllers/User/ReceivedCommentsController.php
Normal file
27
app/Http/Controllers/User/ReceivedCommentsController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ReceivedCommentsController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$user = $request->user();
|
||||
if (! $user) {
|
||||
return redirect()->route('login');
|
||||
}
|
||||
|
||||
try {
|
||||
$comments = app(\App\Services\LegacyService::class)->receivedComments($user->id);
|
||||
} catch (\Throwable $e) {
|
||||
$comments = collect();
|
||||
}
|
||||
|
||||
return view('user.received-comments', [
|
||||
'comments' => $comments,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user