<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () { 
    return view('pagina.principal.index');
});

Route::resource('pagina/temas','TemasController');
Route::get('comentar',['as'=>'comentar','uses'=>'respuController@comentarios']);
Route::post('comentarCreate',['as'=>'comentarCreate','uses'=>'respuController@store']);
Route::get('eliminar',['as'=>'eliminar','uses'=>'respuController@destroy']);
Route::get('volver',['as'=>'volver','uses'=>'respuController@show']);

Route::resource('pagina/principal','PrincipalController');

Route::get('registrar',['as'=>'registrar','uses'=>'PrincipalController@show']);

Route::resource('pagina/matprofe','ProfeController');

Route::resource('pagina/matestu','EstuController');

Route::resource('pagina/usuarios','UsuarioController');
Route::get('comen',['as'=>'comen','uses'=>'UrespuController@comentarios']);
Route::get('vol',['as'=>'vol','uses'=>'UrespuController@show']);
Route::post('comentarUsu',['as'=>'comentarUsu','uses'=>'UrespuController@store']);

Route::auth();

Route::get('/home', 'HomeController@index');
Route::get('/{slug?}', 'PrincipalController@index');


