app/Http/Controllers/Admin/*: Add static method getForm() that will return the livewire component class.
This makes routing abit simpler as one only needs to import the controller.
This commit is contained in:
parent
40b73e1c5c
commit
436c0a1651
4 changed files with 26 additions and 11 deletions
|
|
@ -3,11 +3,17 @@
|
|||
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");
|
||||
|
|
|
|||
Reference in a new issue