add Receprion screen view

This commit is contained in:
aslan 2024-01-30 10:55:31 +03:00
parent e2fab4b9bd
commit b72fcc938f
5 changed files with 76 additions and 2 deletions

View File

@ -14,6 +14,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class FileController extends Controller
{
@ -47,6 +48,10 @@ class FileController extends Controller
WorkWithFiles::saveFileToUploads($content);
$newPath = WorkWithFiles::renameFile($content);
$url = $request->file('file');
$return = Storage::put('file.jpg', $content);
dd($return);
$validated = $request->validated();
$file = new File();
$file->name = $validated['name'];

View File

@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers;
use App\Models\ReceptionScreen;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class PageController extends Controller
{
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{
$receptionScreens = ReceptionScreen::all()->sortBy('position');
return view('menu.reception-screen', compact('receptionScreens'));
}
}

View File

@ -36,7 +36,7 @@
</a>
</div>
<div class="col-lg-3 col-md-4">
<a href="#">
<a href="{{ route('reception-screens') }}">
<div class="tp-feature__item before-color-3 mb-40">
<div class="tp-feature__icon">
<img style="max-width: 26%;" src="{{ URL::to('img/courses/ekrpriem.png') }}" alt="">

View File

@ -0,0 +1,49 @@
@extends('layouts.applicant-layout')
@section('content')
<style>
.buttonHover {
transition: .3s all;
}
.buttonHover:hover {
background-color: #006147;
transform: scale(1.03);
color: #e0e0e0;
}
</style>
<div class="container my-4">
<div class="row d-flex justify-content-center align-items-center">
@foreach($receptionScreens as $receptionScreen)
<div class="col-8">
<a href="{{ route('web-consultations') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
{{ $receptionScreen->name }}
</div>
</h4>
</a>
</div>
@foreach($receptionScreen->files as $file)
<div class="col-8">
<a href="{{ $file->url }}">{{ $file->name }}</a>
</div>
@endforeach
@endforeach
<div class="col-8">
<a href="ui-4.html#">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Калькулятор ЕГЭ
</div>
</h4>
</a>
</div>
</div>
</div>
@endsection

View File

@ -1,6 +1,7 @@
<?php
use App\Http\Controllers\FileController;
use App\Http\Controllers\PageController;
use App\Http\Controllers\ReceptionScreenController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\UploadFileController;
@ -56,7 +57,7 @@ Route::get('/training courses', function () {
})->name('podgotovitelnye-kursy');
Route::get('/reception-screens', [PageController::class, 'index'])->name('reception-screens');
Route::get('/web-consultations', function () {