Archived
1
0
Fork 0
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
wow-raid-bingo/app/Http/Controllers/Admin/CharacterController.php

37 lines
785 B
PHP

<?php
namespace App\Http\Controllers\Admin;
use App\Models\Character;
use App\Http\Livewire\Form\CharacterForm;
use App\Http\Controllers\Controller;
class CharacterController extends Controller
{
static public function getForm() : string
{
return CharacterForm::class;
}
public function index()
{
return view("admin.character.index");
}
public function destroy(Character $character)
{
$character->delete();
return redirect()->route('admin.character.index')
->with('info', __("Character #:id was deleted.", [ 'id' => $character->id ]));
}
public function restore(Character $character)
{
$character->restore();
return redirect()->route('admin.character.index')
->with('info', __("Character #:id was restored.", [ 'id' => $character->id ]));
}
}