Working proposal apply code, fixed schema (need reset - artisan migrate:fresh)
This commit is contained in:
@@ -28,7 +28,7 @@ class TableController extends Controller
|
||||
]);
|
||||
|
||||
/** @var Table $tableModel */
|
||||
$tableModel = $user->tables()->withCount(['favourites', 'forks', 'revisions', 'comments', 'proposals'])
|
||||
$tableModel = $user->tables()->withCount(['favourites', 'forks', 'revisions', 'comments'])
|
||||
->where('name', $table)->first();
|
||||
if ($tableModel === null) abort(404, "No such table.");
|
||||
|
||||
@@ -50,6 +50,7 @@ class TableController extends Controller
|
||||
return view('table.view', [
|
||||
'table' => $tableModel,
|
||||
'revision' => $revision,
|
||||
'proposals_count' => $tableModel->proposals()->unmerged($tableModel)->count(),
|
||||
'columns' => $columns,
|
||||
'rows' => $rows,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user