-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
112 additions
and
5 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/database/migrations/2024_09_12_184810_add_description_to_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?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::table('users', function (Blueprint $table) { | ||
$table->text('description')->nullable()->after('usertype'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void { | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->dropColumn('description'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/resources/views/profile/partials/display-description.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<section> | ||
<header> | ||
<h2 class="text-lg font-medium text-content-text text-gray-400"> | ||
{{ __('About Me') }} | ||
</h2> | ||
</header> | ||
|
||
<p class="mt-2 text-sm text-gray-400"> | ||
{{ $user->description ?? __('No description provided.') }} | ||
</p> | ||
</section> |
30 changes: 30 additions & 0 deletions
30
src/resources/views/profile/partials/update-description-form.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<section> | ||
<header> | ||
<h2 class="text-lg font-medium text-content-text"> | ||
{{ __('Update Description') }} | ||
</h2> | ||
|
||
<p class="mt-1 text-sm text-gray-300"> | ||
{{ __('Write a short description about yourself.') }} | ||
</p> | ||
</header> | ||
|
||
<form method="post" action="{{ route('profile.updateDescription') }}" class="mt-6 space-y-6"> | ||
@csrf | ||
@method('patch') | ||
|
||
<div> | ||
<x-input-label for="description" :value="__('Description')" /> | ||
<textarea id="description" name="description" rows="4" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm">{{ old('description', $user->description) }}</textarea> | ||
<x-input-error :messages="$errors->updateDescription->get('description')" class="mt-2" /> | ||
</div> | ||
|
||
<div class="flex items-center gap-4"> | ||
<x-primary-button>{{ __('Save') }}</x-primary-button> | ||
|
||
@if (session('status') === 'description-updated') | ||
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)" class="text-sm text-gray-600">{{ __('Saved.') }}</p> | ||
@endif | ||
</div> | ||
</form> | ||
</section> |
2 changes: 1 addition & 1 deletion
2
src/resources/views/profile/partials/update-profile-image-form.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters