init
This commit is contained in:
22
app/Http/Controllers/IndexController.php
Normal file
22
app/Http/Controllers/IndexController.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Vote;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
|
||||
function index()
|
||||
{
|
||||
$list = Vote::all();
|
||||
|
||||
return view('index.index', compact('list'));
|
||||
}
|
||||
|
||||
function vote(Vote $vote)
|
||||
{
|
||||
return view('index.vote', compact('vote'));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user