current state
This commit is contained in:
@@ -21,7 +21,7 @@ class ArtController extends Controller
|
||||
if ($request->isMethod('post') && $request->input('action') === 'store_comment') {
|
||||
if (auth()->check()) {
|
||||
try {
|
||||
\Illuminate\Support\Facades\DB::connection('legacy')->table('artworks_comments')->insert([
|
||||
DB::table('artwork_comments')->insert([
|
||||
'artwork_id' => (int)$id,
|
||||
'owner_user_id' => (int)($request->user()->id ?? 0),
|
||||
'user_id' => (int)$request->user()->id,
|
||||
@@ -44,7 +44,7 @@ class ArtController extends Controller
|
||||
|
||||
// load comments for artwork (legacy schema)
|
||||
try {
|
||||
$comments = \Illuminate\Support\Facades\DB::connection('legacy')->table('artworks_comments as t1')
|
||||
$comments = DB::table('artwork_comments as t1')
|
||||
->rightJoin('users as t2', 't1.user_id', '=', 't2.user_id')
|
||||
->select('t1.description', 't1.date', 't1.time', 't2.uname', 't2.signature', 't2.icon', 't2.user_id')
|
||||
->where('t1.artwork_id', (int)$id)
|
||||
|
||||
Reference in New Issue
Block a user