Compare commits

..

No commits in common. "b8063db38b15db64dc899859d63e8ed37044a530" and "21224d43cc752ff8cc42dd78c95128b79139dd1e" have entirely different histories.

16 changed files with 134 additions and 176 deletions

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreOnlineDocumentsRequest;
use App\Http\Requests\UpdateOnlineDocumentsRequest;
use App\Models\OnlineDocuments;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
class OnlineDocumentsController extends Controller
{
public function index()
{
$onlineDocuments = OnlineDocuments::all();
return view('online-documents.index', compact('onlineDocuments'));
}
public function create(OnlineDocuments $documentOnline): View
{
if (Auth::guest()) {
abort(403);
}
$parent = $documentOnline;
return view('online-documents', compact('parent'));
}
public function store(StoreOnlineDocumentsRequest $request)
{
}
/**
* Display the specified resource.
*/
public function show(OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdateOnlineDocumentsRequest $request, OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(OnlineDocuments $doceumentsOnline)
{
//
}
}

View File

@ -1,65 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreReceptionScreenRequest;
use App\Http\Requests\UpdateReceptionScreenRequest;
use App\Models\ReceptionScreen;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
class ReceptionScreenController extends Controller
{
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{
$onlineDocuments = ReceptionScreen::all();
return view('admin-reception-screen.index', compact('onlineDocuments'));
}
public function create(ReceptionScreen $documentOnline): View
{
if (Auth::guest()) {
abort(403);
}
$parent = $documentOnline;
return view('admin-reception-screen', compact('parent'));
}
public function store(StoreReceptionScreenRequest $request)
{
}
/**
* Display the specified resource.
*/
public function show(ReceptionScreen $doceumentsOnline)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(ReceptionScreen $doceumentsOnline)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdateReceptionScreenRequest $request, ReceptionScreen $doceumentsOnline)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(ReceptionScreen $doceumentsOnline)
{
//
}
}

View File

@ -4,7 +4,7 @@ namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreReceptionScreenRequest extends FormRequest
class StoreOnlineDocumentsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.

View File

@ -4,7 +4,7 @@ namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateReceptionScreenRequest extends FormRequest
class UpdateOnlineDocumentsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.

View File

@ -5,7 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ReceptionScreen extends Model
class OnlineDocuments extends Model
{
use HasFactory;

View File

@ -2,11 +2,11 @@
namespace App\Policies;
use App\Models\ReceptionScreen;
use App\Models\OnlineDocuments;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class ReceptionScreenPolicy
class OnlineDocumentsPolicy
{
/**
* Determine whether the user can view any models.
@ -19,7 +19,7 @@ class ReceptionScreenPolicy
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ReceptionScreen $doceumentsOnline): bool
public function view(User $user, OnlineDocuments $doceumentsOnline): bool
{
//
}
@ -35,7 +35,7 @@ class ReceptionScreenPolicy
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ReceptionScreen $doceumentsOnline): bool
public function update(User $user, OnlineDocuments $doceumentsOnline): bool
{
//
}
@ -43,7 +43,7 @@ class ReceptionScreenPolicy
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ReceptionScreen $doceumentsOnline): bool
public function delete(User $user, OnlineDocuments $doceumentsOnline): bool
{
//
}
@ -51,7 +51,7 @@ class ReceptionScreenPolicy
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ReceptionScreen $doceumentsOnline): bool
public function restore(User $user, OnlineDocuments $doceumentsOnline): bool
{
//
}
@ -59,7 +59,7 @@ class ReceptionScreenPolicy
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ReceptionScreen $doceumentsOnline): bool
public function forceDelete(User $user, OnlineDocuments $doceumentsOnline): bool
{
//
}

View File

@ -5,9 +5,9 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ReceptionScreen>
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\OnlineDocuments>
*/
class ReceptionScreenFactory extends Factory
class DocumentsOnlineFactory extends Factory
{
/**
* Define the model's default state.

View File

@ -11,10 +11,12 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('file', function (Blueprint $table) {
Schema::create('online_documents', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('url');
$table->string('parent');
$table->string('children');
$table->timestamps();
});
}
@ -24,6 +26,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('file');
Schema::dropIfExists('online_documents');
}
};

View File

@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('reception_screens', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('reception_screens');
}
};

View File

@ -1,33 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('submenu', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->string('parent');
$table->string('meta_title');
$table->string('meta_description');
$table->string('meta_keywords');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('submenu');
}
};

View File

@ -21,7 +21,7 @@ class DatabaseSeeder extends Seeder
'password' => 123456
]);
$this->call([
ReceptionScreenSeeder::class
OnlineDocumentsSeeder::class
]);
}
}

View File

@ -0,0 +1,41 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class OnlineDocumentsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('online_documents')->insert([
[
'name' => 'Подать документы онлайн',
'url' => '',
'parent' => '0',
'children' => '2/3',
'created_at' => Carbon::now(),
],
[
'name' => 'По образовательным программам высшего образования',
'url' => '',
'parent' => '1',
'children' => '',
'created_at' => Carbon::now(),
],
[
'name' => 'По образовательным программам среднего профессионального образования (колледж)',
'url' => '',
'parent' => '1',
'children' => '',
'created_at' => Carbon::now(),
]
]);
}
}

View File

@ -1,32 +0,0 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ReceptionScreenSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('reception_screens')->insert([
[
'name' => 'Пункт 1 с файлами',
'created_at' => Carbon::now(),
],
[
'name' => 'Пункт 2 с файлами',
'created_at' => Carbon::now(),
],
[
'name' => 'Пункт 3 с файлами',
'created_at' => Carbon::now(),
]
]);
}
}

View File

@ -49,8 +49,16 @@
<div class="row align-items-start">
<aside class="list-group col-2">
<ul>
<li class="list-group-item"><a href="{{ route('admin-reception-screen.index') }}">Экран Приема</a></li>
<li class="list-group-item">
<a href="{{ route('online-documents.index') }}">Подать Документы онлайн</a>
</li>
<li class="list-group-item"><a href="">Абитуриенту</a></li>
<li class="list-group-item"><a href="">Экран Приема</a></li>
<li class="list-group-item"><a href="">Иностранным абитурентам</a></li>
<li class="list-group-item"><a href="">Дни открытых дверей</a></li>
<li class="list-group-item"><a href="">Стоимость обучения</a></li>
<li class="list-group-item"><a href="">Олимпиады для школьников</a></li>
<li class="list-group-item"><a href="">Подготовительные курсы</a></li>
@if(Auth::getUser()->name === 'admin')
<li class="list-group-item"></li>
<li class="list-group-item"><a href="{{ route('users.index') }}">Список администраторов</a></li>

View File

@ -1,6 +1,6 @@
<?php
use App\Http\Controllers\ReceptionScreenController;
use App\Http\Controllers\OnlineDocumentsController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\UploadFileController;
use App\Http\Controllers\UserController;
@ -23,7 +23,7 @@ Route::get('/', function () {
Route::resources([
'/users' => UserController::class,
'/admin-reception-screen' => ReceptionScreenController::class
'/online-documents' => OnlineDocumentsController::class
]);
Route::get('/course', function () {