Adding card controller for administrators
This commit is contained in:
parent
b09bed4a34
commit
086bd81702
2 changed files with 47 additions and 0 deletions
22
app/Http/Controllers/Admin/CardController.php
Normal file
22
app/Http/Controllers/Admin/CardController.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Card;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class CardController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view("admin.card.index");
|
||||
}
|
||||
|
||||
public function destroy(Card $card)
|
||||
{
|
||||
$card->delete();
|
||||
|
||||
return redirect()->route('admin.card.index');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue