Compare commits
2 Commits
a8c6394684
...
3dc4b84357
Author | SHA1 | Date |
---|---|---|
aslan | 3dc4b84357 | |
aslan | 0a9f7ab004 |
|
@ -20,7 +20,6 @@ git clone http://172.17.254.104/aslan/applicant-site.git
|
||||||
cd applicant-site
|
cd applicant-site
|
||||||
make setup
|
make setup
|
||||||
```
|
```
|
||||||
2255
|
|
||||||
|
|
||||||
## Project start local
|
## Project start local
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Helpers;
|
||||||
|
|
||||||
|
use App\Models\Faculty;
|
||||||
|
|
||||||
|
class PositionHelper
|
||||||
|
{
|
||||||
|
public static function faculty()
|
||||||
|
{
|
||||||
|
$maxPosition = Faculty::max('position');
|
||||||
|
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class FacultyController extends Controller
|
class FacultyController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -30,11 +31,12 @@ class FacultyController extends Controller
|
||||||
{
|
{
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
|
$slug = $validated['slug'] === null ? Str::slug($validated['name']) : $validated['slug'];
|
||||||
$faculty = new Faculty();
|
$faculty = new Faculty();
|
||||||
$faculty->name = $validated['name'];
|
$faculty->name = $validated['name'];
|
||||||
$faculty->description = $validated['description'];
|
$faculty->description = $validated['description'];
|
||||||
$faculty->position = $validated['position'];
|
$faculty->position = $validated['position'];
|
||||||
$faculty->slug = $validated['slug'];
|
$faculty->slug = $slug;
|
||||||
$faculty->educational_institution_id = $validated['educational_institution_id'];
|
$faculty->educational_institution_id = $validated['educational_institution_id'];
|
||||||
$faculty->save();
|
$faculty->save();
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ class StoreFacultyRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:faculties,name',
|
'name' => 'required|string|max:255|unique:faculties,name',
|
||||||
'description' => 'string',
|
'description' => 'nullable|string',
|
||||||
'slug' => 'required|string|max:255|unique:faculties,slug',
|
'slug' => 'nullable|string|max:255',
|
||||||
'educational_institution_id' => 'required|int|numeric|max:1000'
|
'educational_institution_id' => 'required|int|numeric|max:1000'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,25 +9,26 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3",
|
"php": "^8.3",
|
||||||
|
"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.43.0",
|
"laravel/framework": "^10.44.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",
|
||||||
"laravelcollective/html": "^6.4.1",
|
"laravelcollective/html": "^6.4.1",
|
||||||
"league/flysystem": "^3.24.0",
|
"league/flysystem": "^3.24.0",
|
||||||
"fakerphp/faker": "^1.23.1"
|
"twbs/bootstrap": "5.2.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"laravel/breeze": "^1.28.1",
|
"laravel/breeze": "^1.28.2",
|
||||||
"laravel/pint": "^1.13.10",
|
"laravel/pint": "^1.13.11",
|
||||||
"laravel/sail": "^1.27.3",
|
"laravel/sail": "^1.27.4",
|
||||||
"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.10",
|
||||||
"spatie/laravel-ignition": "^2.4.1",
|
"spatie/laravel-ignition": "^2.4.2",
|
||||||
"barryvdh/laravel-ide-helper": "^2.13.0",
|
"barryvdh/laravel-ide-helper": "^2.15.1",
|
||||||
"squizlabs/php_codesniffer": "^3.8.1",
|
"squizlabs/php_codesniffer": "^3.8.1",
|
||||||
"phpstan/phpstan": "^1.10.57"
|
"phpstan/phpstan": "^1.10.57"
|
||||||
},
|
},
|
||||||
|
|
|
@ -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": "5cf86f441bf56b881a8a88e4cd9e4af6",
|
"content-hash": "8d490f3e9360173e41450245a26f94f7",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
@ -5718,6 +5718,56 @@
|
||||||
},
|
},
|
||||||
"time": "2023-12-08T13:03:43+00:00"
|
"time": "2023-12-08T13:03:43+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "twbs/bootstrap",
|
||||||
|
"version": "v5.2.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/twbs/bootstrap.git",
|
||||||
|
"reference": "cb021439c683d9805e2864c58095b92d405e9b11"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/cb021439c683d9805e2864c58095b92d405e9b11",
|
||||||
|
"reference": "cb021439c683d9805e2864c58095b92d405e9b11",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"twitter/bootstrap": "self.version"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mark Otto",
|
||||||
|
"email": "markdotto@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jacob Thornton",
|
||||||
|
"email": "jacobthornton@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
||||||
|
"homepage": "https://getbootstrap.com/",
|
||||||
|
"keywords": [
|
||||||
|
"JS",
|
||||||
|
"css",
|
||||||
|
"framework",
|
||||||
|
"front-end",
|
||||||
|
"mobile-first",
|
||||||
|
"responsive",
|
||||||
|
"sass",
|
||||||
|
"web"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/twbs/bootstrap/issues",
|
||||||
|
"source": "https://github.com/twbs/bootstrap/tree/v5.2.3"
|
||||||
|
},
|
||||||
|
"time": "2022-11-21T18:19:01+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
"version": "v5.6.0",
|
"version": "v5.6.0",
|
||||||
|
|
|
@ -83,7 +83,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'locale' => 'en',
|
'locale' => 'ru',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -96,7 +96,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'fallback_locale' => 'en',
|
'fallback_locale' => 'ru',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -109,7 +109,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'faker_locale' => 'en_US',
|
'faker_locale' => 'ru_RU',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used during authentication for various
|
||||||
|
| messages that we need to display to the user. You are free to modify
|
||||||
|
| these language lines according to your application's requirements.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => 'These credentials do not match our records.',
|
||||||
|
'password' => 'The provided password is incorrect.',
|
||||||
|
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||||
|
|
||||||
|
];
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Previous',
|
||||||
|
'next' => 'Next »',
|
||||||
|
|
||||||
|
];
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'reset' => 'Your password has been reset.',
|
||||||
|
'sent' => 'We have emailed your password reset link.',
|
||||||
|
'throttled' => 'Please wait before retrying.',
|
||||||
|
'token' => 'This password reset token is invalid.',
|
||||||
|
'user' => "We can't find a user with that email address.",
|
||||||
|
|
||||||
|
];
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'required' => 'Поле :attribute обязательно.',
|
||||||
|
'unique' => ':attribute уже занят.',
|
||||||
|
];
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'position' => '2',
|
||||||
|
];
|
|
@ -0,0 +1,193 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => 'The :attribute field must be accepted.',
|
||||||
|
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
|
||||||
|
'active_url' => 'The :attribute field must be a valid URL.',
|
||||||
|
'after' => 'The :attribute field must be a date after :date.',
|
||||||
|
'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
|
||||||
|
'alpha' => 'The :attribute field must only contain letters.',
|
||||||
|
'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
|
||||||
|
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
|
||||||
|
'array' => 'The :attribute field must be an array.',
|
||||||
|
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
|
||||||
|
'before' => 'The :attribute field must be a date before :date.',
|
||||||
|
'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
|
||||||
|
'between' => [
|
||||||
|
'array' => 'The :attribute field must have between :min and :max items.',
|
||||||
|
'file' => 'The :attribute field must be between :min and :max kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be between :min and :max.',
|
||||||
|
'string' => 'The :attribute field must be between :min and :max characters.',
|
||||||
|
],
|
||||||
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
|
'can' => 'The :attribute field contains an unauthorized value.',
|
||||||
|
'confirmed' => 'The :attribute field confirmation does not match.',
|
||||||
|
'current_password' => 'The password is incorrect.',
|
||||||
|
'date' => 'The :attribute field must be a valid date.',
|
||||||
|
'date_equals' => 'The :attribute field must be a date equal to :date.',
|
||||||
|
'date_format' => 'The :attribute field must match the format :format.',
|
||||||
|
'decimal' => 'The :attribute field must have :decimal decimal places.',
|
||||||
|
'declined' => 'The :attribute field must be declined.',
|
||||||
|
'declined_if' => 'The :attribute field must be declined when :other is :value.',
|
||||||
|
'different' => 'The :attribute field and :other must be different.',
|
||||||
|
'digits' => 'The :attribute field must be :digits digits.',
|
||||||
|
'digits_between' => 'The :attribute field must be between :min and :max digits.',
|
||||||
|
'dimensions' => 'The :attribute field has invalid image dimensions.',
|
||||||
|
'distinct' => 'The :attribute field has a duplicate value.',
|
||||||
|
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
|
||||||
|
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
|
||||||
|
'email' => 'The :attribute field must be a valid email address.',
|
||||||
|
'ends_with' => 'The :attribute field must end with one of the following: :values.',
|
||||||
|
'enum' => 'The selected :attribute is invalid.',
|
||||||
|
'exists' => 'The selected :attribute is invalid.',
|
||||||
|
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
|
||||||
|
'file' => 'The :attribute field must be a file.',
|
||||||
|
'filled' => 'The :attribute field must have a value.',
|
||||||
|
'gt' => [
|
||||||
|
'array' => 'The :attribute field must have more than :value items.',
|
||||||
|
'file' => 'The :attribute field must be greater than :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be greater than :value.',
|
||||||
|
'string' => 'The :attribute field must be greater than :value characters.',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'array' => 'The :attribute field must have :value items or more.',
|
||||||
|
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be greater than or equal to :value.',
|
||||||
|
'string' => 'The :attribute field must be greater than or equal to :value characters.',
|
||||||
|
],
|
||||||
|
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
|
||||||
|
'image' => 'The :attribute field must be an image.',
|
||||||
|
'in' => 'The selected :attribute is invalid.',
|
||||||
|
'in_array' => 'The :attribute field must exist in :other.',
|
||||||
|
'integer' => 'The :attribute field must be an integer.',
|
||||||
|
'ip' => 'The :attribute field must be a valid IP address.',
|
||||||
|
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
|
||||||
|
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
|
||||||
|
'json' => 'The :attribute field must be a valid JSON string.',
|
||||||
|
'lowercase' => 'The :attribute field must be lowercase.',
|
||||||
|
'lt' => [
|
||||||
|
'array' => 'The :attribute field must have less than :value items.',
|
||||||
|
'file' => 'The :attribute field must be less than :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be less than :value.',
|
||||||
|
'string' => 'The :attribute field must be less than :value characters.',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'array' => 'The :attribute field must not have more than :value items.',
|
||||||
|
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be less than or equal to :value.',
|
||||||
|
'string' => 'The :attribute field must be less than or equal to :value characters.',
|
||||||
|
],
|
||||||
|
'mac_address' => 'The :attribute field must be a valid MAC address.',
|
||||||
|
'max' => [
|
||||||
|
'array' => 'The :attribute field must not have more than :max items.',
|
||||||
|
'file' => 'The :attribute field must not be greater than :max kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must not be greater than :max.',
|
||||||
|
'string' => 'The :attribute field must not be greater than :max characters.',
|
||||||
|
],
|
||||||
|
'max_digits' => 'The :attribute field must not have more than :max digits.',
|
||||||
|
'mimes' => 'The :attribute field must be a file of type: :values.',
|
||||||
|
'mimetypes' => 'The :attribute field must be a file of type: :values.',
|
||||||
|
'min' => [
|
||||||
|
'array' => 'The :attribute field must have at least :min items.',
|
||||||
|
'file' => 'The :attribute field must be at least :min kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be at least :min.',
|
||||||
|
'string' => 'The :attribute field must be at least :min characters.',
|
||||||
|
],
|
||||||
|
'min_digits' => 'The :attribute field must have at least :min digits.',
|
||||||
|
'missing' => 'The :attribute field must be missing.',
|
||||||
|
'missing_if' => 'The :attribute field must be missing when :other is :value.',
|
||||||
|
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
|
||||||
|
'missing_with' => 'The :attribute field must be missing when :values is present.',
|
||||||
|
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
|
||||||
|
'multiple_of' => 'The :attribute field must be a multiple of :value.',
|
||||||
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
|
'not_regex' => 'The :attribute field format is invalid.',
|
||||||
|
'numeric' => 'The :attribute field must be a number.',
|
||||||
|
'password' => [
|
||||||
|
'letters' => 'The :attribute field must contain at least one letter.',
|
||||||
|
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
|
||||||
|
'numbers' => 'The :attribute field must contain at least one number.',
|
||||||
|
'symbols' => 'The :attribute field must contain at least one symbol.',
|
||||||
|
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
|
||||||
|
],
|
||||||
|
'present' => 'The :attribute field must be present.',
|
||||||
|
'present_if' => 'The :attribute field must be present when :other is :value.',
|
||||||
|
'present_unless' => 'The :attribute field must be present unless :other is :value.',
|
||||||
|
'present_with' => 'The :attribute field must be present when :values is present.',
|
||||||
|
'present_with_all' => 'The :attribute field must be present when :values are present.',
|
||||||
|
'prohibited' => 'The :attribute field is prohibited.',
|
||||||
|
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
|
||||||
|
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
|
||||||
|
'prohibits' => 'The :attribute field prohibits :other from being present.',
|
||||||
|
'regex' => 'The :attribute field format is invalid.',
|
||||||
|
'required' => 'The :attribute field is required.',
|
||||||
|
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
|
||||||
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||||
|
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
|
||||||
|
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||||
|
'required_with' => 'The :attribute field is required when :values is present.',
|
||||||
|
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||||
|
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||||
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||||
|
'same' => 'The :attribute field must match :other.',
|
||||||
|
'size' => [
|
||||||
|
'array' => 'The :attribute field must contain :size items.',
|
||||||
|
'file' => 'The :attribute field must be :size kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be :size.',
|
||||||
|
'string' => 'The :attribute field must be :size characters.',
|
||||||
|
],
|
||||||
|
'starts_with' => 'The :attribute field must start with one of the following: :values.',
|
||||||
|
'string' => 'The :attribute field must be a string.',
|
||||||
|
'timezone' => 'The :attribute field must be a valid timezone.',
|
||||||
|
'unique' => 'The :attribute has already been taken.',
|
||||||
|
'uploaded' => 'The :attribute failed to upload.',
|
||||||
|
'uppercase' => 'The :attribute field must be uppercase.',
|
||||||
|
'url' => 'The :attribute field must be a valid URL.',
|
||||||
|
'ulid' => 'The :attribute field must be a valid ULID.',
|
||||||
|
'uuid' => 'The :attribute field must be a valid UUID.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap our attribute placeholder
|
||||||
|
| with something more reader friendly such as "E-Mail Address" instead
|
||||||
|
| of "email". This simply helps us make our message more expressive.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [
|
||||||
|
'password' => 'password',
|
||||||
|
'Password' => 'password',
|
||||||
|
],
|
||||||
|
];
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'required' => 'Поле :attribute обязательно.',
|
||||||
|
];
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'position' => '1',
|
||||||
|
];
|
|
@ -0,0 +1,193 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => ':attribute должен быть принят.',
|
||||||
|
'accepted_if' => ':attribute должен быть принят, если :other равно :value.',
|
||||||
|
'active_url' => ':attribute не является допустимым URL.',
|
||||||
|
'after' => ':attribute должен быть датой после :date.',
|
||||||
|
'after_or_equal' => ':attribute должен быть датой после :date или равным ей.',
|
||||||
|
'alpha' => ':attribute должен содержать только буквы.',
|
||||||
|
'alpha_dash' => ':attribute должен содержать только буквы, цифры, дефисы и символы подчеркивания.',
|
||||||
|
'alpha_num' => ':attribute должен содержать только буквы и цифры.',
|
||||||
|
'array' => ':attribute должен быть массивом.',
|
||||||
|
'ascii' => 'Поле :attribute должно содержать только однобайтные буквенно-цифровые символы и символы.',
|
||||||
|
'before' => ':attribute должен быть датой до :date.',
|
||||||
|
'before_or_equal' => ':attribute должен быть датой, предшествующей :date или равной ей.',
|
||||||
|
'between' => [
|
||||||
|
'array' => ':attribute должен содержать от :min до :max элементов.',
|
||||||
|
'file' => ':attribute должен быть между :min и :max килобайтами.',
|
||||||
|
'numeric' => ':attribute должен быть между :min и :max.',
|
||||||
|
'string' => ':attribute должен быть между символами :min и :max.',
|
||||||
|
],
|
||||||
|
'boolean' => 'Поле :attribute должно быть истинным или ложным.',
|
||||||
|
'can' => 'Поле :attribute содержит неавторизованное значение.',
|
||||||
|
'confirmed' => ':attribute и подтверждение не совпадают',
|
||||||
|
'current_password' => 'Неверный пароль.',
|
||||||
|
'date' => ':attribute не является действительной датой.',
|
||||||
|
'date_equals' => ':attribute должен быть датой, равной :date.',
|
||||||
|
'date_format' => ':attribute не соответствует формату :format.',
|
||||||
|
'decimal' => 'Поле :attribute должно иметь :decimal десятичные места.',
|
||||||
|
'declined' => ':attribute должен быть отклонен.',
|
||||||
|
'declined_if' => ':attribute должен быть отклонен, если :other равно :value.',
|
||||||
|
'different' => ':attribute и :other должны быть разными.',
|
||||||
|
'digits' => 'The :attribute должен быть :digits digits.',
|
||||||
|
'digits_between' => 'должен быть между цифрами :min и :max.',
|
||||||
|
'dimensions' => 'The :attribute имеет недопустимые размеры изображения.',
|
||||||
|
'distinct' => 'The :attribute имеет повторяющееся значение.',
|
||||||
|
'doesnt_end_with' => 'The :attribute не может заканчиваться одним из следующих: :values.',
|
||||||
|
'doesnt_start_with' => 'The :attribute не может начинаться с одного из следующих: :values.',
|
||||||
|
'email' => ':attribute должен быть действительным адресом электронной почты.',
|
||||||
|
'ends_with' => 'The :attribute должен заканчиваться одним из следующих: :values.',
|
||||||
|
'enum' => 'Выбранный :attribute недействителен.',
|
||||||
|
'exists' => 'Выбранный :attribute недействителен.',
|
||||||
|
'extensions' => 'Поле :attribute должно иметь одно из следующих расширений :values.',
|
||||||
|
'file' => ':attribute должен быть файлом.',
|
||||||
|
'filled' => 'Поле :attribute должно иметь значение.',
|
||||||
|
'gt' => [
|
||||||
|
'array' => ':attribute должен содержать больше элементов, чем :value.',
|
||||||
|
'file' => ':attribute должен быть больше :value килобайт.',
|
||||||
|
'numeric' => ':attribute должен быть больше :value.',
|
||||||
|
'string' => ':attribute должен быть больше символов :value.',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'array' => ':attribute должен содержать элементы :value или более.',
|
||||||
|
'file' => ':attribute должен быть больше или равен :value килобайтам.',
|
||||||
|
'numeric' => ':attribute должен быть больше или равен :value.',
|
||||||
|
'string' => ':attribute должен быть больше или равен символам :value.',
|
||||||
|
],
|
||||||
|
'hex_color' => 'Поле :attribute должно иметь допустимый шестнадцатеричный цвет.',
|
||||||
|
'image' => ':attribute должен быть изображением.',
|
||||||
|
'in' => 'Выбранный :attribute недействителен.',
|
||||||
|
'in_array' => 'Поле :attribute не существует в :other.',
|
||||||
|
'integer' => ':attribute должен быть целым числом.',
|
||||||
|
'ip' => ':attribute должен быть действительным IP-адресом.',
|
||||||
|
'ipv4' => ':attribute должен быть действительным адресом IPv4.',
|
||||||
|
'ipv6' => ':attribute должен быть действительным адресом IPv6.',
|
||||||
|
'json' => ':attribute должен быть допустимой строкой JSON.',
|
||||||
|
'lowercase' => 'Поле :attribute должно быть в нижнем регистре.',
|
||||||
|
'lt' => [
|
||||||
|
'array' => ':attribute должен содержать элементов меньше :value.',
|
||||||
|
'file' => ':attribute должен быть меньше :value килобайт.',
|
||||||
|
'numeric' => ':attribute должен быть меньше :value.',
|
||||||
|
'string' => ':attribute должен быть меньше символов :value.',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'array' => ':attribute не должен содержать больше элементов, чем :value.',
|
||||||
|
'file' => 'The :attribute должен быть меньше или равен :value килобайтам.',
|
||||||
|
'numeric' => 'The :attribute должен быть меньше или равен :value.',
|
||||||
|
'string' => 'The :attribute должен быть меньше или равен символам :value.',
|
||||||
|
],
|
||||||
|
'mac_address' => ':attribute должен быть действительным MAC-адресом.',
|
||||||
|
'max' => [
|
||||||
|
'array' => ':attribute должен содержать не более :max элементов.',
|
||||||
|
'file' => ':attribute не должен превышать :max килобайт.',
|
||||||
|
'numeric' => ':attribute не должен быть больше :max.',
|
||||||
|
'string' => ':attribute не должен превышать :max символов.',
|
||||||
|
],
|
||||||
|
'max_digits' => ':attribute не должен содержать более :max цифр.',
|
||||||
|
'mimes' => ':attribute должен быть файлом типа: :values.',
|
||||||
|
'mimetypes' => ':attribute должен быть файлом типа: :values.',
|
||||||
|
'min' => [
|
||||||
|
'array' => ':attribute должен содержать не менее :min элементов.',
|
||||||
|
'file' => ':attribute должен быть не менее :min килобайт.',
|
||||||
|
'numeric' => ':attribute должен быть не меньше :min.',
|
||||||
|
'string' => ':attribute должен иметь длину не менее :min символов.',
|
||||||
|
],
|
||||||
|
'min_digits' => ':attribute должен содержать не менее :min цифр.',
|
||||||
|
'missing' => 'Поле :attribute должно отсутствовать.',
|
||||||
|
'missing_if' => 'Поле :attribute должно отсутствовать, если :other является :value.',
|
||||||
|
'missing_unless' => 'Поле :attribute должно отсутствовать, если :other не является :value.',
|
||||||
|
'missing_with' => 'При наличии :values :attribute должно отсутствовать.',
|
||||||
|
'missing_with_all' => 'Поле :attribute должно отсутствовать при наличии :values.',
|
||||||
|
'multiple_of' => ':attribute должен быть кратен :value.',
|
||||||
|
'not_in' => 'Выбранный :attribute недействителен.',
|
||||||
|
'not_regex' => 'Неверный формат :attribute.',
|
||||||
|
'numeric' => ':attribute должен быть числом.',
|
||||||
|
'password' => [
|
||||||
|
'letters' => ':attribute должен содержать хотя бы одну букву.',
|
||||||
|
'mixed' => ':attribute должен содержать как минимум одну прописную и одну строчную букву.',
|
||||||
|
'numbers' => ':attribute должен содержать хотя бы одно число.',
|
||||||
|
'symbols' => ':attribute должен содержать хотя бы один символ.',
|
||||||
|
'uncompromised' => 'Данный :attribute появился в утечке данных. Пожалуйста, выберите другой :attribute.',
|
||||||
|
],
|
||||||
|
'present' => 'Поле :attribute должно присутствовать.',
|
||||||
|
'present_if' => 'Поле :attribute должно присутствовать, когда :other является :value.',
|
||||||
|
'present_unless' => 'The :attribute field must be present unless :other is :value.',
|
||||||
|
'present_with' => 'Поле :attribute должно присутствовать, если :other не является :value.',
|
||||||
|
'present_with_all' => 'Поле :attribute должно присутствовать, когда присутствуют :values.',
|
||||||
|
'prohibited' => 'Поле :attribute запрещено.',
|
||||||
|
'prohibited_if' => 'Поле :attribute запрещено, если :other равно :value.',
|
||||||
|
'prohibited_unless' => 'Поле :attribute запрещено, если :other не находится в :values.',
|
||||||
|
'prohibits' => 'Поле :attribute запрещает присутствие :other.',
|
||||||
|
'regex' => 'Неверный формат :attribute.',
|
||||||
|
'required' => 'Поле :attribute обязательно.',
|
||||||
|
'required_array_keys' => 'Поле :attribute должно содержать записи для: :values.',
|
||||||
|
'required_if' => 'Поле :attribute обязательно, если :other равно :value.',
|
||||||
|
'required_if_accepted' => 'Поле :attribute обязательно, когда принимается :other.',
|
||||||
|
'required_unless' => 'Поле :attribute является обязательным, если только :other не находится в :values.',
|
||||||
|
'required_with' => 'Поле :attribute обязательно, если присутствует :values.',
|
||||||
|
'required_with_all' => 'Поле :attribute обязательно, если присутствуют :values.',
|
||||||
|
'required_without' => 'Поле :attribute является обязательным, если :values отсутствует.',
|
||||||
|
'required_without_all' => 'Поле :attribute является обязательным, если ни одно из :value не присутствует.',
|
||||||
|
'same' => ':attribute и :other должны совпадать.',
|
||||||
|
'size' => [
|
||||||
|
'array' => ':attribute должен содержать элементы :size.',
|
||||||
|
'file' => ':attribute должен быть :size килобайт.',
|
||||||
|
'numeric' => ':attribute должен быть :size.',
|
||||||
|
'string' => ':attribute должен быть размером :size символов.',
|
||||||
|
],
|
||||||
|
'starts_with' => ':attribute должен начинаться с одного из следующих: :values.',
|
||||||
|
'string' => ':attribute должен быть строкой.',
|
||||||
|
'timezone' => ':attribute должен быть действительным часовым поясом.',
|
||||||
|
'unique' => ':attribute уже занят.',
|
||||||
|
'uploaded' => 'Не удалось загрузить :attribute.',
|
||||||
|
'uppercase' => 'Поле :attribute должно быть в верхнем реистре',
|
||||||
|
'url' => ':attribute должен быть допустимым URL.',
|
||||||
|
'ulid' => 'Поле :attribute должно быть допустимым ULID.',
|
||||||
|
'uuid' => ':attribute должен быть действительным UUID.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap our attribute placeholder
|
||||||
|
| with something more reader friendly such as "E-Mail Address" instead
|
||||||
|
| of "email". This simply helps us make our message more expressive.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [
|
||||||
|
'password' => 'Пароль',
|
||||||
|
'Password' => 'Пароль',
|
||||||
|
],
|
||||||
|
];
|
|
@ -1,4 +1,4 @@
|
||||||
// import './bootstrap';
|
import './bootstrap';
|
||||||
|
|
||||||
import Alpine from 'alpinejs';
|
import Alpine from 'alpinejs';
|
||||||
import ujs from '@rails/ujs';
|
import ujs from '@rails/ujs';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
@php use App\Helpers\PositionHelper; @endphp
|
||||||
@extends('layouts.admin_layout')
|
@extends('layouts.admin_layout')
|
||||||
@section('content')
|
@section('content')
|
||||||
@auth()
|
@auth()
|
||||||
|
@ -7,12 +8,13 @@
|
||||||
{{ Form::open(['url' => route('faculties.store'), 'method' => 'POST', 'class' => '']) }}
|
{{ Form::open(['url' => route('faculties.store'), 'method' => 'POST', 'class' => '']) }}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('position', 'Позиция') }}
|
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.position')]) }}
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('position', '', ['class' => 'form-control']) }}
|
{{ Form::number('position', PositionHelper::faculty(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.position')]) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -20,11 +22,12 @@
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('name', 'Название') }}
|
{{ Form::label('name', 'Название') }}
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -36,18 +39,19 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('description', '', ['class' => 'form-control']) }}
|
{{ Form::text('description', '', ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('educational_institution_id', 'Учебное заведение') }}
|
{{ Form::label('educational_institution_id', 'Учебное заведение') }}
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('educational_institution_id', $educationalInstitutions, null, ['class' => 'form-select']) }}
|
{{ Form::select('educational_institution_id', $educationalInstitutions, null, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('educational_institution_id') }}
|
{{ $errors->first('educational_institution_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -58,7 +62,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', '', ['class' => 'form-control']) }}
|
{{ Form::text('slug', '', ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="antialiased">
|
<body class="antialiased">
|
||||||
|
@include('layouts.tooltips')
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<header
|
<header
|
||||||
class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
|
class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<script type="module">
|
||||||
|
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||||
|
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
||||||
|
</script>
|
Loading…
Reference in New Issue