|
|
@ -46,14 +46,17 @@ class TableController extends Controller |
|
|
|
// Check if table name is unique for user |
|
|
|
// Check if table name is unique for user |
|
|
|
$name = $request->get('name'); |
|
|
|
$name = $request->get('name'); |
|
|
|
if ($u->tables()->where('name', $name)->exists()) { |
|
|
|
if ($u->tables()->where('name', $name)->exists()) { |
|
|
|
return back()->withErrors([ |
|
|
|
return $this->backWithErrors([ |
|
|
|
'title' => "A table called \"$name\" already exists in your account.", |
|
|
|
'name' => "A table called \"$name\" already exists in your account.", |
|
|
|
]); |
|
|
|
]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Parse and validate the columns specification |
|
|
|
|
|
|
|
|
|
|
|
// Now we create rows, a revision pointing to them, and the table using it. |
|
|
|
// Now we create rows, a revision pointing to them, and the table using it. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "Ok."; |
|
|
|
return "Ok."; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|