add ReceptionScreen web resource
This commit is contained in:
parent
604d5a902c
commit
ef1309b2e3
|
@ -1,65 +0,0 @@
|
||||||
<?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)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?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)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ namespace App\Http\Requests;
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
class StoreOnlineDocumentsRequest extends FormRequest
|
class StoreReceptionScreenRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
|
@ -4,7 +4,7 @@ namespace App\Http\Requests;
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
class UpdateOnlineDocumentsRequest extends FormRequest
|
class UpdateReceptionScreenRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
|
@ -5,7 +5,7 @@ namespace App\Models;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class OnlineDocuments extends Model
|
class ReceptionScreen extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace App\Policies;
|
namespace App\Policies;
|
||||||
|
|
||||||
use App\Models\OnlineDocuments;
|
use App\Models\ReceptionScreen;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Auth\Access\Response;
|
use Illuminate\Auth\Access\Response;
|
||||||
|
|
||||||
class OnlineDocumentsPolicy
|
class ReceptionScreenPolicy
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can view any models.
|
* Determine whether the user can view any models.
|
||||||
|
@ -19,7 +19,7 @@ class OnlineDocumentsPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can view the model.
|
* Determine whether the user can view the model.
|
||||||
*/
|
*/
|
||||||
public function view(User $user, OnlineDocuments $doceumentsOnline): bool
|
public function view(User $user, ReceptionScreen $doceumentsOnline): bool
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class OnlineDocumentsPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can update the model.
|
* Determine whether the user can update the model.
|
||||||
*/
|
*/
|
||||||
public function update(User $user, OnlineDocuments $doceumentsOnline): bool
|
public function update(User $user, ReceptionScreen $doceumentsOnline): bool
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class OnlineDocumentsPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can delete the model.
|
* Determine whether the user can delete the model.
|
||||||
*/
|
*/
|
||||||
public function delete(User $user, OnlineDocuments $doceumentsOnline): bool
|
public function delete(User $user, ReceptionScreen $doceumentsOnline): bool
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class OnlineDocumentsPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can restore the model.
|
* Determine whether the user can restore the model.
|
||||||
*/
|
*/
|
||||||
public function restore(User $user, OnlineDocuments $doceumentsOnline): bool
|
public function restore(User $user, ReceptionScreen $doceumentsOnline): bool
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class OnlineDocumentsPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can permanently delete the model.
|
* Determine whether the user can permanently delete the model.
|
||||||
*/
|
*/
|
||||||
public function forceDelete(User $user, OnlineDocuments $doceumentsOnline): bool
|
public function forceDelete(User $user, ReceptionScreen $doceumentsOnline): bool
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
|
@ -5,9 +5,9 @@ namespace Database\Factories;
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\OnlineDocuments>
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ReceptionScreen>
|
||||||
*/
|
*/
|
||||||
class DocumentsOnlineFactory extends Factory
|
class ReceptionScreenFactory extends Factory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Define the model's default state.
|
* Define the model's default state.
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?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');
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?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');
|
||||||
|
}
|
||||||
|
};
|
|
@ -11,12 +11,10 @@ return new class extends Migration
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('online_documents', function (Blueprint $table) {
|
Schema::create('file', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('url');
|
$table->string('url');
|
||||||
$table->string('parent');
|
|
||||||
$table->string('children');
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -26,6 +24,6 @@ return new class extends Migration
|
||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('online_documents');
|
Schema::dropIfExists('file');
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -21,7 +21,7 @@ class DatabaseSeeder extends Seeder
|
||||||
'password' => 123456
|
'password' => 123456
|
||||||
]);
|
]);
|
||||||
$this->call([
|
$this->call([
|
||||||
OnlineDocumentsSeeder::class
|
ReceptionScreenSeeder::class
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +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 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(),
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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(),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -49,16 +49,8 @@
|
||||||
<div class="row align-items-start">
|
<div class="row align-items-start">
|
||||||
<aside class="list-group col-2">
|
<aside class="list-group col-2">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item"><a href="{{ route('admin-reception-screen.index') }}">Экран Приема</a></li>
|
||||||
<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>
|
|
||||||
<li class="list-group-item"><a href="">Подготовительные курсы</a></li>
|
|
||||||
@if(Auth::getUser()->name === 'admin')
|
@if(Auth::getUser()->name === 'admin')
|
||||||
<li class="list-group-item"></li>
|
<li class="list-group-item"></li>
|
||||||
<li class="list-group-item"><a href="{{ route('users.index') }}">Список администраторов</a></li>
|
<li class="list-group-item"><a href="{{ route('users.index') }}">Список администраторов</a></li>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\OnlineDocumentsController;
|
use App\Http\Controllers\ReceptionScreenController;
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
use App\Http\Controllers\UploadFileController;
|
use App\Http\Controllers\UploadFileController;
|
||||||
use App\Http\Controllers\UserController;
|
use App\Http\Controllers\UserController;
|
||||||
|
@ -23,7 +23,7 @@ Route::get('/', function () {
|
||||||
|
|
||||||
Route::resources([
|
Route::resources([
|
||||||
'/users' => UserController::class,
|
'/users' => UserController::class,
|
||||||
'/online-documents' => OnlineDocumentsController::class
|
'/admin-reception-screen' => ReceptionScreenController::class
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::get('/course', function () {
|
Route::get('/course', function () {
|
||||||
|
|
Loading…
Reference in New Issue