Add customer contact inquiry system, automated receipt emails, admin communication inbox, and customer profile management
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Communication;
|
||||
use App\Models\Order;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -25,7 +26,13 @@ class AccountController extends Controller
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return view('account.index', compact('user', 'orders'));
|
||||
$communications = Communication::where('user_id', $user->id)
|
||||
->orWhere('email', strtolower($user->email))
|
||||
->with('replies')
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return view('account.index', compact('user', 'orders', 'communications'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user