Compare commits

..

No commits in common. "08ce25f11e668faee32ac5c1953294f44c8e2e30" and "306d73ff231d84caf8d52c4ba0a754e5c5fd22d5" have entirely different histories.

4 changed files with 12 additions and 144 deletions

View File

@ -17,7 +17,7 @@ class UserController extends Controller
public function store($request) public function store($request)
{ {
if (Auth::guest()) { if (Auth::guest()) {
abort(403, 'Вы не авторизованы!'); return redirect()->route('tasks.index');
} }
$validated = $request->validated(); $validated = $request->validated();
@ -35,12 +35,4 @@ class UserController extends Controller
$message = __('controllers.tasks_create'); $message = __('controllers.tasks_create');
return redirect()->route('tasks.index'); return redirect()->route('tasks.index');
} }
public function create()
{
if (Auth::guest()) {
abort(403, 'Вы не авторизованы!');
}
return view('users.create');
}
} }

View File

@ -9,8 +9,7 @@
"guzzlehttp/guzzle": "^7.8.1", "guzzlehttp/guzzle": "^7.8.1",
"laravel/framework": "^10.40.0", "laravel/framework": "^10.40.0",
"laravel/sanctum": "^3.3.3", "laravel/sanctum": "^3.3.3",
"laravel/tinker": "^2.9.0", "laravel/tinker": "^2.9.0"
"laravelcollective/html": "^6.4.1"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.23.1", "fakerphp/faker": "^1.23.1",
@ -22,7 +21,7 @@
"phpunit/phpunit": "^10.5.5", "phpunit/phpunit": "^10.5.5",
"spatie/laravel-ignition": "^2.4.0", "spatie/laravel-ignition": "^2.4.0",
"barryvdh/laravel-ide-helper": "^2.13.0", "barryvdh/laravel-ide-helper": "^2.13.0",
"squizlabs/php_codesniffer": "^3.8.1", "squizlabs/php_codesniffer": "^3.8.0",
"phpstan/phpstan": "^1.10.55" "phpstan/phpstan": "^1.10.55"
}, },
"autoload": { "autoload": {

91
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": "30204d0ba928d14bfac0180a964aef93", "content-hash": "ee98f0386c39f019aa32fcd8e854a68e",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -1499,79 +1499,6 @@
}, },
"time": "2024-01-04T16:10:04+00:00" "time": "2024-01-04T16:10:04+00:00"
}, },
{
"name": "laravelcollective/html",
"version": "v6.4.1",
"source": {
"type": "git",
"url": "https://github.com/LaravelCollective/html.git",
"reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/64ddfdcaeeb8d332bd98bef442bef81e39c3910b",
"reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b",
"shasum": ""
},
"require": {
"illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/routing": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/session": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/view": "^6.0|^7.0|^8.0|^9.0|^10.0",
"php": ">=7.2.5"
},
"require-dev": {
"illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~8.5|^9.5.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
},
"laravel": {
"providers": [
"Collective\\Html\\HtmlServiceProvider"
],
"aliases": {
"Form": "Collective\\Html\\FormFacade",
"Html": "Collective\\Html\\HtmlFacade"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Collective\\Html\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Adam Engebretson",
"email": "adam@laravelcollective.com"
},
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
}
],
"description": "HTML and Form Builders for the Laravel Framework",
"homepage": "https://laravelcollective.com",
"support": {
"issues": "https://github.com/LaravelCollective/html/issues",
"source": "https://github.com/LaravelCollective/html"
},
"abandoned": "spatie/laravel-html",
"time": "2023-04-25T02:46:11+00:00"
},
{ {
"name": "league/commonmark", "name": "league/commonmark",
"version": "2.4.1", "version": "2.4.1",
@ -9059,16 +8986,16 @@
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.8.1", "version": "3.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "14f5fff1e64118595db5408e946f3a22c75807f7" "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7",
"reference": "14f5fff1e64118595db5408e946f3a22c75807f7", "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9078,11 +9005,11 @@
"php": ">=5.4.0" "php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
}, },
"bin": [ "bin": [
"bin/phpcbf", "bin/phpcs",
"bin/phpcs" "bin/phpcbf"
], ],
"type": "library", "type": "library",
"extra": { "extra": {
@ -9135,7 +9062,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2024-01-11T20:47:48+00:00" "time": "2023-12-08T12:32:31+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",

View File

@ -1,50 +0,0 @@
@auth()
<div class="grid col-span-full">
<h1 class="max-w-2xl mb-4 text-4xl leading-none tracking-tight md:text-5xl xl:text-6xl dark:text-white"> создать
пользователя</h1>
{{ Form::open(['url' => route('users.store'), 'method' => 'POST', 'class' => 'w-50']) }}
<div class="flex flex-col">
<div>
{{ Form::label('name', 'Логин') }}
</div>
<div class="mt-2">
{{ Form::text('name', '', ['class' => 'form-control rounded border-gray-300 w-1/3']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div>
{{ Form::label('email', 'электронная почта') }}
</div>
<div class="mt-2">
{{ Form::text('email', '', ['class' => 'form-control rounded border-gray-300 w-1/3']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('email') }}
@endif
</div>
<div>
{{ Form::label('password', 'Пароль') }}
</div>
<div class="mt-2">
{{ Form::text('password', '', ['class' => 'form-control rounded border-gray-300 w-1/3']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('password') }}
@endif
</div>
<div class="mt-4">
{{ Form::submit('создать', ['class' => 'bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded']) }}
</div>
</div>
{{ Form::close() }}
</div>
@endauth