Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Add) Manual User Warning #1705 #2020

Merged
merged 2 commits into from
Dec 5, 2021
Merged

(Add) Manual User Warning #1705 #2020

merged 2 commits into from
Dec 5, 2021

Conversation

Alkl58
Copy link
Contributor

@Alkl58 Alkl58 commented Nov 28, 2021

As always: Test before merging this PR! (It has been several months since I touched this code and I am not 100% sure if something is missing)

Added Button:
grafik

Clicking on the Button:
grafik

This PR changes the warnings table:

Schema::table('warnings', function (Blueprint $table) {
     $table->bigInteger('torrent')->unsigned()->nullable()->change();
});

A new route has been added:

Route::post('/{username}/warn', [App\Http\Controllers\Staff\UserController::class, 'warnUser'])->name('user_warn');

For the frontend representation: Basically it checks if the value torrent exist:

@if(isset($warning->torrent))
<a class="text-bold"
     href="{{ route('torrent', ['id' => $warning->torrenttitle->id]) }}">
     {{ $warning->torrenttitle->name }}
 </a>
@else
n/a
@endif

It should look like this:
grafik

@HDVinnie HDVinnie merged commit 4a7ae91 into HDInnovations:master Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants