From 28128a71faa8b3f7ed7346a5dbde2831a7fe5a1b Mon Sep 17 00:00:00 2001 From: Alessio Comi Date: Fri, 15 Dec 2023 18:23:50 +0100 Subject: [PATCH] normalizing style --- app/Http/Controllers/RequestController.php | 6 +- app/Http/Requests/ProfileUpdateRequest.php | 2 +- composer.lock | 72 ------------------- .../views/request/confirmation.blade.php | 2 +- resources/views/request/create.blade.php | 19 ----- resources/views/request/proposal.blade.php | 32 +++++++++ 6 files changed, 37 insertions(+), 96 deletions(-) delete mode 100644 resources/views/request/create.blade.php create mode 100644 resources/views/request/proposal.blade.php diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php index 148f5f7..37acbba 100644 --- a/app/Http/Controllers/RequestController.php +++ b/app/Http/Controllers/RequestController.php @@ -8,11 +8,11 @@ class RequestController extends Controller { /** - * Show the form for creating a new resource. + * Show the form for proposing a new music. */ public function create() { - return view('request.create'); + return view('request.proposal'); } /** @@ -20,7 +20,7 @@ public function create() */ public function store(Request $request) { - $songRequest = SongRequest::create($request->validated()->only(['song_name', 'artist_name'])); + $songRequest = SongRequest::create($request->only(['song_name', 'artist_name'])); return view('request.confirmation')->with(['title' => $songRequest->song_name, 'author' => $songRequest->artist_name]); } diff --git a/app/Http/Requests/ProfileUpdateRequest.php b/app/Http/Requests/ProfileUpdateRequest.php index 6071838..f9a80ba 100644 --- a/app/Http/Requests/ProfileUpdateRequest.php +++ b/app/Http/Requests/ProfileUpdateRequest.php @@ -16,7 +16,7 @@ class ProfileUpdateRequest extends FormRequest public function rules(): array { return [ - 'name' => ['required', 'string', 'max:255'], + 'name' => ['required', 'string', 'max:25'], 'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)], ]; } diff --git a/composer.lock b/composer.lock index d413e33..38039b4 100644 --- a/composer.lock +++ b/composer.lock @@ -1314,78 +1314,6 @@ ], "time": "2023-08-27T10:19:19+00:00" }, - { - "name": "inertiajs/inertia-laravel", - "version": "v0.6.10", - "source": { - "type": "git", - "url": "https://github.com/inertiajs/inertia-laravel.git", - "reference": "609f960c9392e61f8f10418e333599cf1b12efbe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/609f960c9392e61f8f10418e333599cf1b12efbe", - "reference": "609f960c9392e61f8f10418e333599cf1b12efbe", - "shasum": "" - }, - "require": { - "ext-json": "*", - "laravel/framework": "^6.0|^7.0|^8.74|^9.0|^10.0", - "php": "^7.2|~8.0.0|~8.1.0|~8.2.0|~8.3.0" - }, - "require-dev": { - "mockery/mockery": "^1.3.3", - "orchestra/testbench": "^4.0|^5.0|^6.4|^7.0|^8.0", - "phpunit/phpunit": "^8.0|^9.5.8", - "roave/security-advisories": "dev-master" - }, - "suggest": { - "ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command." - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Inertia\\ServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "./helpers.php" - ], - "psr-4": { - "Inertia\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Reinink", - "email": "jonathan@reinink.ca", - "homepage": "https://reinink.ca" - } - ], - "description": "The Laravel adapter for Inertia.js.", - "keywords": [ - "inertia", - "laravel" - ], - "support": { - "issues": "https://github.com/inertiajs/inertia-laravel/issues", - "source": "https://github.com/inertiajs/inertia-laravel/tree/v0.6.10" - }, - "funding": [ - { - "url": "https://github.com/reinink", - "type": "github" - } - ], - "time": "2023-09-13T02:24:55+00:00" - }, { "name": "laravel/framework", "version": "v10.25.2", diff --git a/resources/views/request/confirmation.blade.php b/resources/views/request/confirmation.blade.php index 88c38e4..7082219 100644 --- a/resources/views/request/confirmation.blade.php +++ b/resources/views/request/confirmation.blade.php @@ -8,7 +8,7 @@ - + Retour au jeu diff --git a/resources/views/request/create.blade.php b/resources/views/request/create.blade.php deleted file mode 100644 index bf59753..0000000 --- a/resources/views/request/create.blade.php +++ /dev/null @@ -1,19 +0,0 @@ -@extends('layout.app') -@section('content') - -
-

Proposer une musique :

-
- @csrf - -
- -
- -
- - Retour au jeu -
- -@vite(['resources/js/pages/game.js']) -@endsection diff --git a/resources/views/request/proposal.blade.php b/resources/views/request/proposal.blade.php new file mode 100644 index 0000000..732c7ad --- /dev/null +++ b/resources/views/request/proposal.blade.php @@ -0,0 +1,32 @@ + +@extends('layout.app') +@section('content') + +
+

Proposer une musique :

+ + + + +
+ @csrf + + +
+ + + +
+ + +
+ + + +
+ + +
+
+ +@endsection \ No newline at end of file