<?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!
|
*/

Route::get('/set-cookie/{name}/{value}', function() {
    $response = new Illuminate\Http\Response('try');
    $response->withCookie(cookie()->forever($name, $value)); // this will last five years

    return $response;
});

Route::get('/get-cookie', function() {
   dd(Cookie::get('invitation')); // showing you different ways to set / get the cookie
});

Route::get('/', function () {
    return view('welcome');
});

Route::group(['prefix' => 'invite/'], function ($ints){

	// $router->controller('/','ApplicationController');
	$ints->get('/accept', 'InvitationController@postAccept');

});





Route::group(
[
  'prefix' => 'event/'
],
function($app) {

	$app->get('{slug}/', 'EventPageController@index');
	$app->get('detail/{slug}', 'EventPageController@detail');

});