Tighten ACP forum actions and avatar handling
This commit is contained in:
@@ -68,7 +68,12 @@ class ForumController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$position = Forum::where('parent_id', $parentId)->max('position');
|
||||
if ($parentId === null) {
|
||||
Forum::whereNull('parent_id')->increment('position');
|
||||
$position = 0;
|
||||
} else {
|
||||
$position = Forum::where('parent_id', $parentId)->max('position');
|
||||
}
|
||||
|
||||
$forum = Forum::create([
|
||||
'name' => $data['name'],
|
||||
|
||||
Reference in New Issue
Block a user