|
@@ -7,6 +7,9 @@ use App\Models\Clause;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Ramsey\Uuid\Uuid;
|
|
use Ramsey\Uuid\Uuid;
|
|
|
|
+use App\Models\StatTree;
|
|
|
|
+use App\Models\StatTreeLine;
|
|
|
|
+use App\Models\StatTreeLineClause;
|
|
|
|
|
|
class ClauseController extends Controller
|
|
class ClauseController extends Controller
|
|
{
|
|
{
|
|
@@ -33,6 +36,10 @@ class ClauseController extends Controller
|
|
$rows = json_decode($data);
|
|
$rows = json_decode($data);
|
|
|
|
|
|
Clause::truncate();
|
|
Clause::truncate();
|
|
|
|
+ //Should we truncate related data?
|
|
|
|
+ StatTree::truncate();
|
|
|
|
+ StatTreeLine::truncate();
|
|
|
|
+ StatTreeLineClause::truncate();
|
|
|
|
|
|
for($i = 0; $i < count($rows); $i++){
|
|
for($i = 0; $i < count($rows); $i++){
|
|
$row = $rows[$i];
|
|
$row = $rows[$i];
|