Compare commits

..

3 Commits

Author SHA1 Message Date
aslan 98e7687d72 composer update
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Failing after 1m49s Details
Tests & Lint & Deploy to Railway / deploy (push) Has been skipped Details
2024-03-05 16:54:26 +03:00
aslan 7f98a7edc5 merge roman 2024-03-05 16:52:52 +03:00
aslan 19ea529eb2 fix tests errors 2024-03-05 16:51:29 +03:00
7 changed files with 31 additions and 32 deletions

View File

@ -73,6 +73,7 @@ class DirectionController extends Controller
$direction->period = $validated['period']; $direction->period = $validated['period'];
$direction->save(); $direction->save();
if (array_key_exists('entrance-examination', $validated)) {
foreach ($validated['entrance-examination'] as $data) { foreach ($validated['entrance-examination'] as $data) {
$entranceExamination = new EntranceExamination(); $entranceExamination = new EntranceExamination();
$entranceExamination->examination_type_id = $data['examination_type_id']; $entranceExamination->examination_type_id = $data['examination_type_id'];
@ -83,6 +84,8 @@ class DirectionController extends Controller
$entranceExamination->subject_type_id = $data['subject_type_id']; $entranceExamination->subject_type_id = $data['subject_type_id'];
$entranceExamination->save(); $entranceExamination->save();
} }
}
if (array_key_exists('direction_profiles', $validated)) { if (array_key_exists('direction_profiles', $validated)) {

View File

@ -21,14 +21,4 @@ class EducationForm extends Model
{ {
return $this->hasMany('App\Models\Direction', 'education_form_id'); return $this->hasMany('App\Models\Direction', 'education_form_id');
} }
public function places(): HasMany
{
return $this->hasMany('App\Models\Place', 'education_form_id');
}
public function costs(): HasMany
{
return $this->hasMany('App\Models\Cost', 'education_form_id');
}
} }

View File

@ -12,7 +12,7 @@
"fakerphp/faker": "^1.23.1", "fakerphp/faker": "^1.23.1",
"guzzlehttp/guzzle": "^7.8.1", "guzzlehttp/guzzle": "^7.8.1",
"imangazaliev/didom": "^2.0.1", "imangazaliev/didom": "^2.0.1",
"laravel/framework": "^10.44.0", "laravel/framework": "^10.46.0",
"laravel/sanctum": "^3.3.3", "laravel/sanctum": "^3.3.3",
"laravel/tinker": "^2.9.0", "laravel/tinker": "^2.9.0",
"laravel/ui": "^4.4.0", "laravel/ui": "^4.4.0",
@ -21,16 +21,16 @@
"twbs/bootstrap": "5.2.3" "twbs/bootstrap": "5.2.3"
}, },
"require-dev": { "require-dev": {
"laravel/breeze": "^1.28.2", "laravel/breeze": "^1.29.0",
"laravel/pint": "^1.13.11", "laravel/pint": "^1.14.0",
"laravel/sail": "^1.27.4", "laravel/sail": "^1.28.1",
"mockery/mockery": "^1.6.7", "mockery/mockery": "^1.6.7",
"nunomaduro/collision": "^7.10.0", "nunomaduro/collision": "^7.10.0",
"phpunit/phpunit": "^10.5.10", "phpunit/phpunit": "^10.5.11",
"spatie/laravel-ignition": "^2.4.2", "spatie/laravel-ignition": "^2.4.2",
"barryvdh/laravel-ide-helper": "^2.15.1", "barryvdh/laravel-ide-helper": "^2.15.1",
"squizlabs/php_codesniffer": "^3.8.1", "squizlabs/php_codesniffer": "^3.9.0",
"phpstan/phpstan": "^1.10.57" "phpstan/phpstan": "^1.10.59"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "508caf2079a4111080260230b4ab3370", "content-hash": "d33acbf60a62d946e0b4a7923aab2689",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",

View File

@ -1,6 +1,7 @@
<?php <?php
use App\Http\Controllers\admin\PageController; use App\Http\Controllers\admin\PageController;
use App\Models\Faculty;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::get('/inostran', function () { Route::get('/inostran', function () {
@ -11,11 +12,12 @@ Route::get('/magistr', function () {
return view('new-design.magistr'); return view('new-design.magistr');
})->name('magistr'); })->name('magistr');
Route::get('/', [PageController::class, 'directions'])->name('/bakalavr-special'); Route::get('/home', [PageController::class, 'directions'])->name('home');
//Route::get('/', function () { Route::get('/', function () {
// return view('new-design.bakalavr-special'); $faculties = Faculty::all();
//})->name('bakalavr-special'); return view('new-design.bakalavr-special', compact('faculties'));
})->name('bakalavr-special');
Route::get('/course', function () { Route::get('/course', function () {
return view('menu.course'); return view('menu.course');

View File

@ -47,6 +47,11 @@ class DirectionTest extends TestCase
'education_level_id', 'education_level_id',
'education_form_id', 'education_form_id',
'department_id', 'department_id',
'budget_places',
'quota',
'paid_places',
'cost_paid_place',
'period'
]); ]);
$this->user = User::factory()->create([ $this->user = User::factory()->create([

View File

@ -36,7 +36,6 @@ class DirectionProfileTest extends TestCase
'position', 'position',
'description', 'description',
'slug', 'slug',
'direction_id',
]); ]);
$this->user = User::factory()->create([ $this->user = User::factory()->create([