<?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 Closure to execute when that URI is requested. | */ /*GENERAL - USUARIOS SIN REGISTRAR*/ Route::get('/', function () { $Libros = Libro::with('comentarios')->get(); return View::make('vistas.home')->with('books', $Libros); }); Route::get('user/adduser', 'UriController@getAdduser'); Route::get('user/profile', 'UriController@getProfile'); Route::get('user/search', 'UriController@getSearchbook'); Route::controller('/actionuser', 'UsuarioController'); Route::controller('/auth', 'LoginController'); Route::group(array('before' => 'administrador'), function () { /*ADMINISTRADOR*/ Route::get('book/addbook', 'UriController@getAddbook'); Route::get('book/editbook', 'UriController@getEditbook'); Route::get('book/details', 'UriController@getDetailsbook'); Route::controller('actionbook', 'LibroController'); Route::get('user/show', 'UriController@getShowusers'); Route::get('search', 'UriController@getSearch'); Route::get('find/book/{codigoLibro}', 'LibroController@getselectlibro');
public function getInicio() { $Libros = Libro::with('comentarios')->get(); return View::make('vistas.home')->with('books', $Libros); }
public function postBooks() { return array('libros' => Libro::with('libros_has_generos')->get()); }