diff --git a/app/Http/Controllers/DirectionForTildaController.php b/app/Http/Controllers/DirectionForTildaController.php new file mode 100644 index 0000000..c5f62fd --- /dev/null +++ b/app/Http/Controllers/DirectionForTildaController.php @@ -0,0 +1,99 @@ +allowedFilters('name') + ->orderBy('id', 'desc')->get(); +// $directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true); + $filter = $request->filter ?? null; + return view('new-design.tilda.index', compact('directions', 'filter')); + } + + /** + * Show the form for creating a new resource. + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + */ + public function show(Direction $direction) + { +// $department = $direction->department; +// $faculty = Faculty::find($department->faculty->id); +// $educationalInstitution = $faculty->educationalInstitution; +// +// $ege = $direction +// ->entranceExaminations +// ->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value) +// ->sortBy('position') +// ->pluck('scores', 'subject_id'); +// +// $spo = $direction +// ->entranceExaminations->where('examination_type_id', '=', ExaminationTypeEnum::Spo->value) +// ->sortBy('position') +// ->pluck('scores', 'subject_id'); +// +// $magistracy = $direction +// ->entranceExaminations +// ->where('examination_type_id', '=', ExaminationTypeEnum::Magistracy->value) +// ->sortBy('position') +// ->pluck('scores', 'subject_id'); + + return view( + 'new-design.tilda.show', + compact( + 'direction' + ) + ); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit(string $id) + { + // + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, string $id) + { + // + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(string $id) + { + // + } +} diff --git a/resources/views/new-design/tilda/index.blade.php b/resources/views/new-design/tilda/index.blade.php new file mode 100644 index 0000000..b479dcf --- /dev/null +++ b/resources/views/new-design/tilda/index.blade.php @@ -0,0 +1,36 @@ +@extends('layouts.admin_layout') +@section('content') + +@foreach($directions as $direction) +{{-- @dd($direction)--}} +
{{ $direction->position }} | +{{ $direction->name }}
+ +
+ @foreach($direction->directionProfiles as $directionProfile)
+ {{ $directionProfile->name }} |
+ {{ Str::words($direction->description, 10, '...') }} | +{{ $direction->slug }} | +{{ $direction->department->name }} | +{{ $direction->educationLevel->name }} | ++ редактировать + Дублировать + удалить + | +
---|