diff --git a/app/Http/Controllers/admin/PageController.php b/app/Http/Controllers/admin/PageController.php index e2c0279..e5c21fd 100644 --- a/app/Http/Controllers/admin/PageController.php +++ b/app/Http/Controllers/admin/PageController.php @@ -7,6 +7,7 @@ use App\Http\Controllers\Controller; use App\Models\Admission; use App\Models\Direction; use App\Models\Faculty; +use App\Models\Subject; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Foundation\Application; @@ -22,13 +23,14 @@ class PageController extends Controller public function directions() { - $directions = DB::table('faculties') - ->join('departments', 'faculties.id', '=', 'departments.faculty_id') - ->join('directions', 'departments.id', '=', 'directions.department_id') - ->select('faculties.name as faculties.name', 'directions.name', 'directions.id') - ->groupBy('faculties.name') - ->get(); +// $directions = DB::table('faculties') +// ->join('departments', 'faculties.id', '=', 'departments.faculty_id') +// ->join('directions', 'departments.id', '=', 'directions.department_id') +// ->select('faculties.name as faculties.name', 'directions.name', 'directions.id') +// ->groupBy('faculties.name') +// ->get(); $faculties = Faculty::all(); + $subjects = Subject::pluck('name', 'id'); // $infBez = $faculties->find(FacultyEnum::InfBez->value); // $query = `select faculties.name, directions.name, directions.id //FROM faculties @@ -43,9 +45,10 @@ class PageController extends Controller // } // // } - return view('new-design.bakalavr-special', compact('faculties')); + return view('new-design.bakalavr-special', compact('faculties', 'subjects')); } + public function calculator($request) { return response()->json($request); diff --git a/public/json.php b/public/json.php index 5219b9f..cfc14cd 100644 --- a/public/json.php +++ b/public/json.php @@ -7,18 +7,7 @@ if(isset($_POST['ajx'])) { } if($_POST['ajx']=='get_napr') { if(isset($_POST['format'])&&$_POST['format']=='html'){ - $out['html'] = ' -
Технологический факультет | -Строительство | -4 года | -
Технологический факультет | -Строительство | -4 года | -
Технологический факультет | -Строительство | -4 года | -
Технологический факультет | -Строительство | -4 года | -