pollthingy/routes/web.php

29 lines
881 B
PHP
Raw Normal View History

2018-10-03 22:19:45 +02:00
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//NOTE: This is 302 because we might want to add a welcome page at some point
Route::redirect('/', '/poll', 302);
Route::get('/poll', 'PollController');
Route::post('/poll', 'PollController@create');
Route::get('/poll/{poll}', 'PollController@view');
2018-10-17 15:12:20 +02:00
2018-10-19 20:16:58 +02:00
Route::get('/poll/{poll}/edit', 'PollController@admin');
Route::patch('/poll/{poll}', 'PollController@edit');
Route::post('/poll/{poll}/vote', 'PollController@vote');
2018-10-19 20:16:58 +02:00
Route::get('/poll/{poll}/results', 'PollController@viewResults');