Skip to content

Commit

Permalink
Created routes for admin functions and one for accessing profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tipmisle committed Dec 12, 2017
1 parent 96f2f0f commit a33d242
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,31 @@
| contains the "web" middleware group. Now create something great!
|
*/
//route root
Route::get('/', 'HomeController@index');

Route::get('/', function () {
return view('welcome');
//login route
Route::get('/login', 'HomeController@login');
//group of routes for our adminController functions
Route::group(
['middleware' => ['admin']],
function(){

Route::get('/dashboard', 'AdminController@index');

Route::get('/calendar/create', 'AdminController@createCalendar');
Route::post('/calendar/create', 'AdminController@doCreateCalendar');

Route::get('/event/create', 'AdminController@createEvent');
Route::post('/event/create', 'AdminController@doCreateEvent');

Route::get('/calendar/sync', 'AdminController@syncCalendar');
Route::post('/calendar/sync', 'AdminController@doSyncCalendar');

Route::get('/events', 'AdminController@listEvents');

Route::get('/logout', 'AdminController@logout');
});

//profile route
Route::get('/profile/{id}', 'UserController@profile');

0 comments on commit a33d242

Please sign in to comment.