| */ Route::get('/', function () { return view('app'); }); Route::post('oauth/access_token', function () { return Response::json(Authorizer::issueAccessToken()); }); Route::group(['middleware' => 'oauth'], function () { Route::resource('client', 'ClientController', ['except' => 'create', 'edit', 'show']); Route::resource('projects', 'ProjectsController', ['except' => 'create', 'edit']); Route::group(['prefix' => 'projects'], function () { route::get('{id}/notes', 'ProjectNotesController@index'); route::post('{id}/notes', 'ProjectNotesController@store'); route::get('{id}/notes/{noteId}', 'ProjectNotesController@show'); route::put('{id}/notes/{noteId}', 'ProjectNotesController@update'); route::delete('{id}/notes/{noteId}', 'ProjectNotesController@destroy'); route::get('{id}/task', 'ProjectTaskController@index'); route::post('{id}/task', 'ProjectTaskController@store'); route::get('{id}/task/{taskId}', 'ProjectTaskController@show'); route::put('{id}/task/{taskId}', 'ProjectTaskController@update'); route::delete('{id}/task/{taskId}', 'ProjectTaskController@destroy'); route::get('{id}/members', 'ProjectMembersController@index'); route::post('{id}/members', 'ProjectMembersController@store'); route::get('{id}/members/{membersId}', 'ProjectMembersController@isMember'); route::put('{id}/members/{membersId}', 'ProjectMembersController@update'); route::delete('{id}/members/{membersId}', 'ProjectMembersController@destroy'); Route::post('{id}/file', 'ProjectFileController@store'); Route::delete('{id}/file/{projectFileId}', 'ProjectFileController@destroy'); }); });
<?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. | */ App::missing(function () { return Redirect::to('/404'); }); route::get('/404', function () { return View::make('error.404'); }); Route::get('/', function () { return View::make('index'); }); Route::get('/tcit/student/subscribe', 'HomeController@showForm');
<?php Route::model('brands', 'AbuseIO\\Models\\Brand'); Route::resource('brands', 'BrandsController'); Route::group(['prefix' => 'brands', 'as' => 'brands.'], function () { // Search contacts Route::get('search/{one?}/{two?}/{three?}/{four?}/{five?}', ['middleware' => 'permission:brands_view', 'as' => 'search', 'uses' => 'BrandsController@search']); // Access to index list route::get('', ['middleware' => 'permission:brands_view', 'as' => 'index', 'uses' => 'BrandsController@index']); // Access to show object route::get('{brands}', ['middleware' => 'permission:brands_view', 'as' => 'show', 'uses' => 'BrandsController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:brands_export', 'as' => 'export', 'uses' => 'BrandsController@export']); // Access to create object route::get('create', ['middleware' => 'permission:brands_create', 'as' => 'create', 'uses' => 'BrandsController@create']); route::post('', ['middleware' => 'permission:brands_create', 'as' => 'store', 'uses' => 'BrandsController@store']); // Access to edit object route::get('{brands}/edit', ['middleware' => 'permission:brands_edit', 'as' => 'edit', 'uses' => 'BrandsController@edit']); route::patch('{brands}', ['middleware' => 'permission:brands_edit', 'as' => 'update', 'uses' => 'BrandsController@update']); route::put('{brands}', ['middleware' => 'permission:brands_edit', 'as' => 'update', 'uses' => 'BrandsController@update']); // Access to delete object route::delete('/{brands}', ['middleware' => 'permission:brands_delete', 'as' => 'destroy', 'uses' => 'BrandsController@destroy']); });
//verEntregasPorUbicacion Route::get('administrador/crear-evento', ['as' => 'crearEvento', 'uses' => 'EventosController@createevento']); Route::post('administrador/crear-evento', ['as' => 'register', 'uses' => 'EventosController@register']); Route::get('administrador/ver-eventos', ['as' => 'verEvento', 'uses' => 'EventosController@verEventos']); Route::get('administrador/crear-sector', ['as' => 'crearSector', 'uses' => 'SectoresController@crearsector']); Route::post('administrador/crear-sector', ['as' => 'registersector', 'uses' => 'SectoresController@register']); Route::get('administrador/ver-ventasonline', ['as' => 'verVentasOnline', 'uses' => 'VentasController@verVentasOnline']); Route::post('administrador/ver-ventasonline', ['as' => 'busquedaUsuario', 'uses' => 'VentasController@busquedaUsuario']); //Route::post('administrador/executeSearch', ['as' => 'search', 'uses' => 'EventosController@executeSearch']); Route::get('administrador/ver-ventassectores', ['as' => 'verVentasSectores', 'uses' => 'VentasController@verVentasSectores']); Route::get('administrador/ver-ventas/{id}', ['as' => 'verVentasDetalle', 'uses' => 'VentasController@verVentasDetalle']); //REPORTES ENTREGAS Route::get('administrador/ver-entregassectores', ['as' => 'verEntregasSectores', 'uses' => 'EntregasController@verEntregasSectores']); Route::get('administrador/ver-entregasubicaciones', ['as' => 'verEntregasPorUbicacion', 'uses' => 'EntregasController@verEntregasPorUbicacion']); //REPORTES ENTREGAS -> por fecha route::get('administrador/entregasFecha', ['as' => 'showEntregasFechaSector', 'uses' => 'AdministradorController@showEntregasFechaSector']); route::post('administrador/entregasFecha', ['as' => 'buscarEntregasFechaSector', 'uses' => 'AdministradorController@buscarEntregasFechaSector']); //REPORTES VENTAS FISICAS Route::get('administrador/ver-ventasfisicas', ['as' => 'verVentasFisicas', 'uses' => 'VentasController@verVentasFisicas']); Route::get('administrador/ver-ventasfisicassectores', ['as' => 'verVentasFisicasSectores', 'uses' => 'VentasController@verVentasFisicasSectores']); Route::get('administrador/ver-ventasfisicas/{id}', ['as' => 'verVentasFisicasSectorDetalle', 'uses' => 'VentasController@verVentasFisicasSectorDetalle']); Route::get('administrador/ver-ventasfisicasubicaciones', ['as' => 'verVentasFisicasUbicaciones', 'uses' => 'VentasController@verVentasFisicasUbicaciones']); Route::get('administrador/ver-ventas/fisicas/{id}', ['as' => 'verVentasFisicasUbicacionDetalle', 'uses' => 'VentasController@verVentasFisicasUbicacionDetalle']); }); //SOLO LOS DE TIPO VENDEDOR Route::group(['before' => 'is_vendedor'], function () { //VIEW layout ENTREGA ENTRADA (VENTAS ONLINE) Route::get('administrador/preventascanje', ['as' => 'canjeEntradas', 'uses' => 'AdministradorController@canjeEntradas']); //VERIFICAR CODIGO->ENTREGA DE ENTRADAS (VENTAS ONLINE) Route::post('administrador/preventascanje', ['as' => 'canjeVerificar', 'uses' => 'AdministradorController@canjeVerificar']); //ENTREGAR ENTRADA FISICA (VENTAS ONLINE)
// is this step 6? I don't think it's being used. Route::get('stepshowloans', 'ClientController@StepShowLoans'); Route::post('steploansf', 'ClientController@StepShowLoansForm'); /// ??? Route::get('step6upload', 'ClientController@Step6upload'); Route::post('step6f', 'ClientController@Step6Form'); Route::post('step7f', 'ClientController@Step7Form'); // Step 7: PAYMENT INFORMATION -- Information is saved to the Session. Route::post('step7f', 'ClientController@Step7Form'); // Completed: We need to give them a completed step. Route::get('processpayment', 'ClientController@ProcessPayment'); Route::post('paymentupdate', 'ClientController@CheckPaymentUpdate'); // payment completed //completed says it generated the forms and will be the final success page they will see. It should update the top view too! Route::get('paymentcompleted', 'ClientController@PaymentCompleted'); Route::get('paymentfailed', 'ClientController@PaymentFailed'); Route::get('paymentdeclined', 'ClientController@PaymentFailed'); // client has updated the generated forms Route::get('updatesuccess', 'ClientController@UpdateSuccess'); #### Login to office use system Route::get('office_login', 'ClientController@CheckOfficePassword'); Route::post('updatestatus', 'ClientController@FormUpdateStatus'); Route::get('returningcustomer', 'ClientController@ReturningCustomer'); Route::get('crm', 'ClientController@ShowCRM'); Route::post('returningclientf', 'ClientController@ReturningCustomerForm'); route::get('paymentpendingmsg', 'ClientController@PaymentPendingWait'); route::post('RegisterBrowserSession', 'ClientController@System_Register_With_Clients_BrowserID'); Route::get('logout', function () { Session::forget('fileNumber'); return Redirect::to('/'); });
<?php Route::model('accounts', 'AbuseIO\\Models\\Account'); Route::resource('accounts', 'AccountsController'); Route::group(['prefix' => 'accounts', 'as' => 'accounts.'], function () { // Search contacts Route::get('search/{one?}/{two?}/{three?}/{four?}/{five?}', ['middleware' => 'permission:accounts_view', 'as' => 'search', 'uses' => 'AccountsController@search']); // Access to index list route::get('', ['middleware' => 'permission:accounts_view', 'as' => 'index', 'uses' => 'AccountsController@index']); // Access to show object route::get('{accounts}', ['middleware' => 'permission:accounts_view', 'as' => 'show', 'uses' => 'AccountsController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:accounts_export', 'as' => 'export', 'uses' => 'AccountsController@export']); // Access to create object route::get('create', ['middleware' => 'permission:accounts_create', 'as' => 'create', 'uses' => 'AccountsController@create']); route::post('', ['middleware' => 'permission:accounts_create', 'as' => 'store', 'uses' => 'AccountsController@store']); // Access to disable object route::get('{accounts}/disable', ['middleware' => 'permission:accounts_disable', 'as' => 'disable', 'uses' => 'AccountsController@disable']); // Access to enable object route::get('{accounts}/enable', ['middleware' => 'permission:accounts_enable', 'as' => 'enable', 'uses' => 'AccountsController@enable']); // Access to edit object route::get('{accounts}/edit', ['middleware' => 'permission:accounts_edit', 'as' => 'edit', 'uses' => 'AccountsController@edit']); route::patch('{accounts}', ['middleware' => 'permission:accounts_edit', 'as' => '', 'uses' => 'AccountsController@update']); route::put('{accounts}', ['middleware' => 'permission:accounts_edit', 'as' => 'update', 'uses' => 'AccountsController@update']); // Access to delete object route::delete('/{accounts}', ['middleware' => 'permission:accounts_delete', 'as' => 'destroy', 'uses' => 'AccountsController@destroy']); });
return view('home.ktu'); }); // Route::get('login', function () {return view('auth/login');}); // Route::get('auth/login', 'Auth\AuthController@getLogin'); // Route::post('auth/login', 'Auth\AuthController@postLogin'); // Route::get('auth/logout', 'Auth\AuthController@getLogout'); Route::controllers(['auth' => 'Auth\\AuthController']); // Password reset link request routes... Route::get('password/email', 'Auth\\PasswordController@getEmail'); Route::post('password/email', 'Auth\\PasswordController@postEmail'); // Password reset routes... Route::get('password/reset/{token}', 'Auth\\PasswordController@getReset'); Route::post('password/reset', 'Auth\\PasswordController@postReset'); route::get('/mail', function () { Mail::send('emails.test', ['name' => 'Dewi'], function ($message) { $message->to('*****@*****.**', 'qiqiechinen')->from('*****@*****.**', 'dewi')->subject('welcome!'); }); }); // pagu Route::get('pagu/daftar', array('as' => 'daftar_pagu', 'uses' => 'AdminController@daftar_pagu')); Route::get('pagu/buat', array('as' => 'buat_pagu', 'uses' => 'AdminController@buat_pagu')); Route::post('pagu/daftar', array('as' => 'simpan_pagu', 'uses' => 'AdminController@simpan_pagu')); // pagu bagian Route::get('pagu/bagian/daftar', array('as' => 'daftar_pagu_bagian', 'uses' => 'AdminController@daftar_pagu_bagian')); Route::get('pagu/bagian/buat', array('as' => 'buat_pagu_bagian', 'uses' => 'AdminController@buat_pagu_bagian')); Route::post('pagu/bagian/daftar', array('as' => 'simpan_pagu_bagian', 'uses' => 'AdminController@simpan_pagu_bagian')); // pagu output Route::get('pagu/output/daftar', array('as' => 'daftar_pagu_output', 'uses' => 'AdminController@daftar_pagu_output')); Route::get('pagu/output/buat', array('as' => 'buat_pagu_output', 'uses' => 'AdminController@buat_pagu_output')); Route::post('pagu/output/daftar', array('as' => 'simpan_pagu_output', 'uses' => 'AdminController@simpan_pagu_output')); //usulan
<?php Route::resource('notes', 'NotesController'); Route::model('notes', 'AbuseIO\\Models\\Note'); Route::group(['prefix' => 'notes', 'as' => 'notes.'], function () { // Access to index list route::get('', ['middleware' => 'permission:notes_view', 'as' => 'index', 'uses' => 'NotesController@index']); // Access to show object route::get('{notes}', ['middleware' => 'permission:notes_view', 'as' => 'show', 'uses' => 'NotesController@show']); // Access to create object route::get('create', ['middleware' => 'permission:notes_create', 'as' => 'create', 'uses' => 'NotesController@create']); route::post('', ['middleware' => 'permission:notes_create', 'as' => 'store', 'uses' => 'NotesController@store']); // Access to edit object route::get('{notes}/edit', ['middleware' => 'permission:notes_edit', 'as' => 'edit', 'uses' => 'NotesController@edit']); route::patch('{notes}', ['middleware' => 'permission:notes_edit', 'as' => 'update', 'uses' => 'NotesController@update']); route::put('{notes}', ['middleware' => 'permission:notes_edit', 'as' => 'update', 'uses' => 'NotesController@update']); // Access to delete object route::delete('/{notes}', ['middleware' => 'permission:notes_delete', 'as' => 'destroy', 'uses' => 'NotesController@destroy']); });
<?php Route::resource('netblocks', 'NetblocksController'); Route::model('netblocks', 'AbuseIO\\Models\\Netblock'); Route::group(['prefix' => 'netblocks', 'as' => 'netblocks.'], function () { // Search netblock Route::get('search/{one?}/{two?}/{three?}', ['middleware' => 'permission:netblocks_view', 'as' => 'search', 'uses' => 'NetblocksController@search']); // Access to index list route::get('', ['middleware' => 'permission:netblocks_view', 'as' => 'index', 'uses' => 'NetblocksController@index']); // Access to show object route::get('{netblocks}', ['middleware' => 'permission:netblocks_view', 'as' => 'show', 'uses' => 'NetblocksController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:netblocks_export', 'as' => 'export', 'uses' => 'NetblocksController@export']); // Access to create object route::get('create', ['middleware' => 'permission:netblocks_create', 'as' => 'create', 'uses' => 'NetblocksController@create']); route::post('', ['middleware' => 'permission:netblocks_create', 'as' => 'store', 'uses' => 'NetblocksController@store']); // Access to edit object route::get('{netblocks}/edit', ['middleware' => 'permission:netblocks_edit', 'as' => 'edit', 'uses' => 'NetblocksController@edit']); route::patch('{netblocks}', ['middleware' => 'permission:netblocks_edit', 'as' => 'update', 'uses' => 'NetblocksController@update']); route::put('{netblocks}', ['middleware' => 'permission:netblocks_edit', 'as' => 'update', 'uses' => 'NetblocksController@update']); // Access to delete object route::delete('/{netblocks}', ['middleware' => 'permission:netblocks_delete', 'as' => 'destroy', 'uses' => 'NetblocksController@destroy']); });
return Redirect::to('auth/login'); }); Route::get('home', 'HomeController@index'); Route::controllers(['password' => 'Auth\\PasswordController']); // Authentication routes... Route::get('auth/login', 'Auth\\AuthController@getLogin'); Route::post('auth/login', 'Auth\\AuthController@postLogin'); Route::get('auth/logout', 'Auth\\AuthController@getLogout'); Route::group(['prefix' => 'admin'], function () { /*these has middle ware guest in controller AuthController*/ route::get('/', function () { return Redirect::to('admin/dashboard'); }); Route::get('/logout', 'Admin\\AdminAuthController@getAdminLogout'); route::group(['middleware' => ['admin-guest']], function () { route::get('/login', 'Admin\\AdminAuthController@getAdminLogin'); route::post('/login', 'Admin\\AdminAuthController@postAdminLogin'); }); /*secure admin routes*/ route::group(['middleware' => ['admin-auth']], function () { route::get('/dashboard', 'Admin\\AdminDashboardController@getDashboard'); route::group(['prefix' => 'clients'], function () { route::get('/', 'Admin\\AdminClientsController@getClients'); route::get('/add', 'Admin\\AdminClientsController@getAddClient'); route::post('/add', 'Admin\\AdminClientsController@postAddClient'); }); }); }); // Registration routes...for the users and anybody else are disabled. /*Route::get('auth/register', 'Auth\AuthController@getRegister'); Route::post('auth/register', 'Auth\AuthController@postRegister');*/
// Noticias Route::get('/noticias', ['as' => 'noticias', 'uses' => 'NoticiaController@index']); Route::get('/noticia/{slug}/{id}', ['as' => 'noticia', 'uses' => 'NoticiaController@show']); // Eventos Route::get('/eventos', ['as' => 'activities', 'uses' => 'ActivityController@index']); Route::get('/evento/{slug}/{id}', ['as' => 'activity', 'uses' => 'ActivityController@show']); // Carreras Route::get('/carreras', ['as' => 'courses', 'uses' => 'CourseController@index']); Route::get('/carrera/{slug}/{id}', ['as' => 'course', 'uses' => 'CourseController@show']); // Galerias Route::get('/galerias', ['as' => 'galleries', 'uses' => 'GalleryController@index']); Route::get('/galeria/{slug}/{id}', ['as' => 'gallery', 'uses' => 'GalleryController@show']); // Plana Aadministrativa route::get('/plana-administrativa', ['as' => 'leadership', 'uses' => 'LeaderShipController@index']); // Incotec route::get('/incotec', ['as' => 'incotec', 'uses' => 'IncotecController@index']); // Contacto Route::get('/contacto', ['as' => 'contact', 'uses' => 'ContactController@index']); Route::post('/contacto', ['as' => 'contact_store', 'before' => 'csrf', 'uses' => 'ContactController@store']); // Login Route::post('/login', ['as' => 'login', 'before' => 'csrf', 'uses' => 'AuthController@postLogin']); Route::get('/logout', ['as' => 'logout', 'before' => 'auth', 'uses' => 'AuthController@logout']); Route::group(['before' => 'guest'], function () { Route::get('/login', ['as' => 'login', 'uses' => 'AuthController@showLogin']); Route::get('/forgot-password', ['as' => 'forgot', 'uses' => 'AuthController@getForgotPassword']); Route::post('/forgot-password', ['as' => 'forgot-post', 'uses' => 'AuthController@postForgotPassword']); Route::get('/recover/{code}', ['as' => 'account-recover', 'uses' => 'AuthController@getRecover']); }); Route::group(['before' => 'auth'], function () { require __DIR__ . '/routes/auth.php'; Route::group(['before' => 'is_admin'], function () {
//completed says it generated the forms and will be the final success page they will see. It should update the top view too! Route::get('paymentcompleted', 'ClientController@PaymentCompleted'); Route::get('paymentfailed', 'ClientController@PaymentFailed'); Route::get('paymentdeclined', 'ClientController@PaymentFailed'); // client has updated the generated forms Route::get('updatesuccess', 'ClientController@UpdateSuccess'); Route::post('updatestatus', 'ClientController@FormUpdateStatus'); Route::get('returningcustomer', 'ClientController@ReturningCustomer'); Route::get('crm', 'ClientController@ShowCRM'); Route::post('returningclientf', 'ClientController@ReturningCustomerForm'); route::get('paymentpendingmsg', 'ClientController@PaymentPendingWait'); route::get('clientinfo', function () { $fileNumber = Session::get('fileNumber'); $username = '******'; $password = '******'; $campaignId = '7181dcbd-bf75-425d-b5c5-b839de8d499d'; $leadtrackapi = new leadtracapi($username, $password); $clientinfo = $leadtrackapi->GetClient($fileNumber, array('FirstName', 'LastName', 'WebsiteSource', 'Paid_Products')); // $clientinfo = $leadtrackapi->FindClientsByCity("NJ"); return "<pre>" . print_r($clientinfo, 1) . "</pre>"; }); Route::get('logout', function () { Session::forget('fileNumber'); return Redirect::to('/'); }); Route::get('wizard', function () { return View::make('wizard'); }); // //Route::get('/', function() //{ // return View::make('newcustomer');
<?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('/', 'WelcomeController@index'); Route::get('home', 'HomeController@index'); Route::get('ranking', 'HomeController@ranking'); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']); Route::group(['prefix' => 'admin', 'middleware' => ['auth', 'is_admin'], 'namespace' => 'Admin'], function () { route::resource('users', 'UsersController'); }); Route::group(['prefix' => 'battleship', 'middleware' => 'auth', 'namespace' => 'BattleShip'], function () { route::resource('game', 'GameController'); route::get('joinagame/{gameid}', 'GameController@joinagame'); Route::post('play/{id}', 'GameController@save'); Route::post('ready', 'GameController@setready'); Route::post('matchstart', 'GameController@setmatchstarted'); Route::post('attack/{id}', 'GameController@attack'); Route::post('updatewin/{id}', 'GameController@updatewin'); Route::post('updatelose/{id}', 'GameController@updatelose'); });
<?php Route::resource('profile', 'ProfileController'); Route::group(['prefix' => 'profile', 'as' => 'profile.'], function () { // Access to index list route::get('', ['middleware' => 'permission:profile_manage', 'as' => 'index', 'uses' => 'ProfileController@edit']); // Access to edit object route::patch('{profile}', ['middleware' => 'permission:profile_manage', 'as' => 'update', 'uses' => 'ProfileController@update']); route::put('{profile}', ['middleware' => 'permission:profile_manage', 'as' => 'update', 'uses' => 'ProfileController@update']); });
public static function run() { define('DINGO_VERSION', '0.7.1'); // Start buffer ob_start(); // Autoloading files require_once SYSTEM . '/core/core.php'; require_once SYSTEM . '/core/error.php'; spl_autoload_register(array('bootstrap', 'autoload')); bootstrap::addPackage(SYSTEM . '/core'); bootstrap::addPackage(SYSTEM . '/library'); bootstrap::addPackage(APPLICATION . '/'); load::library('db'); require_once APPLICATION . '/' . CONFIG . '/' . CONFIGURATION . '/config.php'; set_error_handler('dingo_error'); set_exception_handler('dingo_exception'); // Load route configuration require_once APPLICATION . '/' . CONFIG . '/' . CONFIGURATION . '/route.php'; set_error_handler('dingo_error'); set_exception_handler('dingo_exception'); config::set('system', SYSTEM); config::set('application', APPLICATION); config::set('config', CONFIG); // Load route configuration require_once APPLICATION . '/' . CONFIG . '/' . CONFIGURATION . '/route.php'; // Get route $uri = route::get(bootstrap::get_request_url()); // Set current page define('CURRENT_PAGE', $uri['string']); // Validate if (!route::valid($uri)) { load::error('general', 'Invalid URL', 'The requested URL contains invalid characters.'); } // Load Controller //---------------------------------------------------------------------------------------------- // Initialize controller $tmp = "{$uri['controller_class']}_controller"; if (!class_exists($tmp)) { load::error('404'); } $controller = new $tmp(); unset($tmp); // Check if using valid REST API if (api::get()) { if (!empty($controller->controller_api) and is_array($controller->controller_api) and !empty($controller->controller_api[$uri['function']]) and is_array($controller->controller_api[$uri['function']])) { foreach ($controller->controller_api[$uri['function']] as $e) { api::permit($e); } if (!api::allowed(api::get())) { load::error('404'); } } else { load::error('404'); } } // Autoload Components bootstrap::autoload1($controller); // Check to see if function exists if (!is_callable(array($controller, $uri['function']))) { // Try replacing underscores with dashes $minus_function_name = str_replace('-', '_', $uri['function']); if (!is_callable(array($controller, $minus_function_name))) { load::error('404'); } else { $uri['function'] = $minus_function_name; } } // Run Function call_user_func_array(array($controller, $uri['function']), $uri['arguments']); // Display echoed content ob_end_flush(); }
<?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('/', 'PagesController@index'); Route::get('about', 'PagesController@about'); route::get('contact', 'PagesController@contact'); route::get('menu', 'PagesController@menu'); Route::get('/blog', 'BlogController@index'); //Route::get('blog/{{slug}}', 'BlogController@showPost');
| */ Route::get('/', 'PagesController@home'); Route::get('/aaulyp', 'PagesController@aaulyp'); Route::get('/aaul', 'PagesController@aaul'); Route::get('/board', 'PagesController@board'); Route::get('/donate', 'PagesController@donate'); Route::get('/team/join', 'PagesController@join'); Route::get('/contact/faq', 'PagesController@faq'); Route::get('/contact', 'PagesController@contact'); Route::get('/ypweekend2016', 'PagesController@ypweekend'); Route::get('/committee/{name}', 'PagesController@committees'); Route::get('/volunteer/request', 'PagesController@volunteerRequest'); Route::post('/webhooks/eventbrite/orders', 'WebhookController@ebOrders'); Route::post('/webhooks/ypweekend/orders', 'WebhookController@ypWeekendOrders'); route::get('/events/fb/{id}', 'FacebookController@show'); /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | This route group applies the "web" middleware group to every route | it contains. The "web" middleware group is defined in your HTTP | kernel and includes session state, CSRF protection, and more. | */ Route::group(['middleware' => 'web'], function () { Route::auth(); Route::get('/home', 'HomeController@index'); Route::resource('events', 'EventsController'); Route::get('{zip}/{name}', 'EventsController@show');
| 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('formulario', 'StorageController@index'); Route::resource('login', 'UsuarioController@login'); Route::resource('mi_cuenta', 'UsuarioController@mi_cuenta'); Route::resource('registro', 'UsuarioController@registro'); Route::get('registrar', 'UsuarioController@registrar'); Route::get('iniciar_sesion', 'UsuarioController@iniciar_sesion'); Route::get('cambiar_contraseña', 'UsuarioController@cambiar_contrasena'); Route::get('mis_servicios', 'ServicioController@mis_servicios'); Route::get('busqueda', 'ServicioController@busqueda'); Route::get('establece_calificacion', 'ServicioController@establece_calificacion'); Route::get('actualizar_servicio', 'ServicioController@update'); Route::get('destacados', 'ServicioController@destacados'); Route::get('modificar/{id}', 'ServicioController@modificar'); Route::get('activar_cuenta/{id}', 'UsuarioController@activar_cuenta'); Route::get('activac', 'UsuarioController@activac'); Route::get('eliminar', 'ServicioController@destroy'); route::get('crear_servicio', 'ServicioController@create'); route::post('registra_servicio', 'ServicioController@store'); route::post('sube_imagenes', 'ServicioController@sube_imagenes'); Route::get('prueba', 'UsuarioController@store'); Route::get('cerrar_sesion', 'UsuarioController@cerrar_sesion'); Route::get('/', 'UsuarioController@index'); Route::get('vista_detallada/{id}', 'ServicioController@show'); Route::get('busca_categoria/{categoria}', 'ServicioController@busca_categoria'); Route::get('home', 'HomeController@index'); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
/** * 'Builds' the page based on $uri. * Finds all the different nodes this page is made of * and initializes all the sub-requests, placing the response * in the right section of the page. * * @param string $uri - page uri */ public function action_index($uri = NULL) { $this->title = 'hello'; $this->template = View::factory('templates/default'); $this->request->response = $this->template; return; // parse the URI and find parameters $segments = explode('/', $uri); $current_segment = NULL; $page = ORM::factory('page'); foreach ($segments as $segment) { if ($current_segment === NULL) { $current_segment = $segment; $page = $page->where('uri', '=', $current_segment); } else { $current_segment .= '/' . $segment; $page = $page->or_where('uri', '=', $current_segment); } } // find the most complete match $page = $page->order_by('uri', 'DESC')->find(); if (!$page->loaded()) { // yuriko page doesn't exist Event::run('yuriko.404'); return; } // get parameters $parameters = substr($uri, strlen($page->uri)); // set the template defined in the database $this->template = new View('templates/' . $page->template); //get all nodes on this page $page_nodes = $page->page_nodes->find_all(); foreach ($page_nodes as $page_node) { $route_params = array(); //get this node $node = $page_node->node; //get custom parameters for this node $params = $node->node_route_parameters->find_all(); foreach ($params as $param) { $route_params[$param->key] = $param->value; } //replace node params with page_node params $params = $page_node->node_route_parameters->find_all(); foreach ($params as $param) { $route_params[$param->key] = $param->value; } //get the route $node_route = $node->node_route; //route name (to make the sub-request) $route = route::get($node_route->name); //find the uri and append the parameters to it $uri = $route->uri($route_params) . $parameters; if ($page_node->section === NULL) { //execute sub-request and let the node handle outputting Request::factory($uri)->execute(); } else { //execute sub-request and put output in the right section section::set($page_node->section, Request::factory($uri)->execute()); } } $this->request->response = $this->template; }
<?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('welcome'); }); route::get('client', 'ClientController@index'); route::post('client', 'ClientController@store'); route::get('client/{id}', 'ClientController@show'); route::delete('client/{id}', 'ClientController@destroy'); route::put('client/{id}', 'ClientController@update');
<?php Route::resource('contacts', 'ContactsController'); Route::model('contacts', 'AbuseIO\\Models\\Contact'); Route::group(['prefix' => 'contacts', 'as' => 'contacts.'], function () { // Search contacts Route::get('search/{one?}/{two?}/{three?}/{four?}/{five?}', ['middleware' => 'permission:contacts_view', 'as' => 'search', 'uses' => 'ContactsController@search']); // Access to index list route::get('', ['middleware' => 'permission:contacts_view', 'as' => 'index', 'uses' => 'ContactsController@index']); // Access to show object route::get('{contacts}', ['middleware' => 'permission:contacts_view', 'as' => 'show', 'uses' => 'ContactsController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:contacts_export', 'as' => 'export', 'uses' => 'ContactsController@export']); // Access to create object route::get('create', ['middleware' => 'permission:contacts_create', 'as' => 'create', 'uses' => 'ContactsController@create']); route::post('', ['middleware' => 'permission:contacts_create', 'as' => 'store', 'uses' => 'ContactsController@store']); // Access to edit object route::get('{contacts}/edit', ['middleware' => 'permission:contacts_edit', 'as' => 'edit', 'uses' => 'ContactsController@edit']); route::patch('{contacts}', ['middleware' => 'permission:contacts_edit', 'as' => 'update', 'uses' => 'ContactsController@update']); route::put('{contacts}', ['middleware' => 'permission:contacts_edit', 'as' => 'update', 'uses' => 'ContactsController@update']); // Access to delete object route::delete('{contacts}', ['middleware' => 'permission:contacts_delete', 'as' => 'destroy', 'uses' => 'ContactsController@destroy']); });
<?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('/', ['uses' => 'HomeAdminController@index', 'as' => 'home']); route::get('auth/login', ['uses' => 'Auth\\AuthController@getLogin', 'as' => 'auth.login']); route::post('auth/login', ['uses' => 'Auth\\AuthController@postLogin', 'as' => 'auth.login']); route::get('auth/logout', ['uses' => 'Auth\\AuthController@getLogout', 'as' => 'auth.logout']); Route::group(['prefix' => 'admin'], function () { Route::get('/', ['uses' => 'HomeAdminController@index2', 'as' => 'admin.home.index', 'middleware' => 'auth']); Route::resource('users', 'UsersController', ['middleware' => 'auth']); Route::get('users/{id}/destroy', ['uses' => 'UsersController@destroy', 'as' => 'admin.users.destroy', 'middleware' => 'auth']); Route::resource('proyectos', 'ProyectosController', ['middleware' => 'auth']); Route::resource('clientes', 'ClientesController', ['middleware' => 'auth']); Route::get('clientes/{id}/destroy', ['uses' => 'ClientesController@destroy', 'as' => 'admin.clientes.destroy', 'middleware' => 'auth']); });
<?php Route::group(['prefix' => 'analytics', 'as' => 'analytics.'], function () { // Access to index list route::get('', ['middleware' => 'permission:analytics_view', 'as' => 'view', 'uses' => 'AnalyticsController@index']); });
<?php Route::resource('domains', 'DomainsController'); Route::model('domains', 'AbuseIO\\Models\\Domain'); Route::group(['prefix' => 'domains', 'as' => 'domains.'], function () { // Search domains Route::get('search/{one?}/{two?}', ['middleware' => 'permission:domains_view', 'as' => 'search', 'uses' => 'DomainsController@search']); // Access to index list route::get('', ['middleware' => 'permission:domains_view', 'as' => 'index', 'uses' => 'DomainsController@index']); // Access to show object route::get('{domains}', ['middleware' => 'permission:domains_view', 'as' => 'show', 'uses' => 'DomainsController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:domains_export', 'as' => 'export', 'uses' => 'DomainsController@export']); // Access to create object route::get('create', ['middleware' => 'permission:domains_create', 'as' => 'create', 'uses' => 'DomainsController@create']); route::post('', ['middleware' => 'permission:domains_create', 'as' => 'store', 'uses' => 'DomainsController@store']); // Access to edit object route::get('{domains}/edit', ['middleware' => 'permission:domains_edit', 'as' => 'edit', 'uses' => 'DomainsController@edit']); route::patch('{domains}', ['middleware' => 'permission:domains_edit', 'as' => 'update', 'uses' => 'DomainsController@update']); route::put('{domains}', ['middleware' => 'permission:domains_edit', 'as' => 'update', 'uses' => 'DomainsController@update']); // Access to delete object route::delete('/{domains}', ['middleware' => 'permission:domains_delete', 'as' => 'destroy', 'uses' => 'DomainsController@destroy']); });
|-------------------------------------------------------------------------- | | 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('welcome'); }); */ use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Auth; Route::get('/', 'MainController@home'); Route::get('home', ['as' => 'homePath', 'uses' => 'MainController@home']); Route::get('about', ['as' => 'aboutPath', 'uses' => 'MainController@about']); Route::get('contacts', ['as' => 'contactsPath', 'uses' => 'MainController@contacts']); Route::get('login', ['as' => 'loginPath', 'uses' => 'MainController@login']); Route::get('signup', ['as' => 'signupPath', 'uses' => 'MainController@signup']); Route::post('signup', ['as' => 'signup', 'uses' => 'UserController@signup']); Route::post('login', ['as' => 'login', 'uses' => 'UserController@login']); Route::get('logout', ['as' => 'logoutPath', 'uses' => 'UserController@logout']); route::get('create', ['as' => 'profilePath', 'middleware' => 'auth', 'uses' => 'UserController@profile']); route::post('create', ['as' => 'createPost', 'uses' => 'usercontroller@post']); route::get('all-posts', ['as' => 'allPostsPath', 'middleware' => 'auth', 'uses' => 'UserController@all_posts']); route::get('find-friends', ['as' => 'findFriendsPath', 'middleware' => 'auth', 'uses' => 'UserController@findFriend']); route::get('auth/login', ['as' => 'guest', 'uses' => 'UserController@guest']); route::get('/{id}', ['as' => 'myProfilePath', 'middleware' => 'auth', 'uses' => 'UserController@show']); route::get('/user/{id}', ['as' => 'userProfilePath', 'middleware' => 'auth', 'uses' => 'UserController@showUser']);
Route::get('{id}/destroy', ['as' => 'provas.destroy', 'uses' => 'ProvasController@destroy']); Route::get('/create', ['as' => 'provas.create', 'uses' => 'ProvasController@create']); }); Route::get('bancas', ['as' => 'bancas', 'uses' => 'BancaController@index']); Route::post('bancas', 'BancaController@store'); Route::get('bancas/create', ['as' => 'bancas.create', 'uses' => 'BancaController@create']); Route::get('bancas/{id}/destroy', ['as' => 'bancas.destroy', 'uses' => 'BancaController@destroy']); Route::get('bancas/{id}/edit', ['as' => 'bancas.edit', 'uses' => 'BancaController@edit']); Route::post('bancas/{id}/update', ['as' => 'bancas.update', 'uses' => 'BancaController@update']); Route::get('questoes', ['as' => 'questoes', 'uses' => 'QuestoesController@index']); Route::get('questoes/create/{id}', ['as' => 'questoes.create', 'uses' => 'QuestoesController@create']); Route::get('usuarios', ['as' => 'usuarios', 'uses' => 'UsuariosController@index']); Route::post('usuarios', ['as' => 'usuarios.store', 'uses' => 'UsuariosController@store']); }); route::get('bancas/{banca}', function (Questions\Banca $banca) { return $banca->descricao; }); // Authentication routes... Route::get('auth/login', 'Auth\\AuthController@getLogin'); Route::post('auth/login', 'Auth\\AuthController@postLogin'); Route::get('auth/logout', 'Auth\\AuthController@getLogout'); // Registration routes... Route::get('auth/register', 'Auth\\AuthController@getRegister'); Route::post('auth/register', 'Auth\\AuthController@postRegister'); // Password reset link request routes... Route::get('password/email', 'Auth\\PasswordController@getEmail'); Route::post('password/email', 'Auth\\PasswordController@postEmail'); // Password reset routes... Route::get('password/reset/{token}', 'Auth\\PasswordController@getReset'); Route::post('password/reset', 'Auth\\PasswordController@postReset'); Route::get('/home', function () {
<?php Route::model('users', 'AbuseIO\\Models\\User'); Route::resource('users', 'UsersController'); Route::group(['prefix' => 'users', 'as' => 'users.'], function () { // Search users Route::get('search/{one?}/{two?}/{three?}', ['middleware' => 'permission:users_view', 'as' => 'search', 'uses' => 'UsersController@search']); // Access to index list route::get('', ['middleware' => 'permission:users_view', 'as' => 'index', 'uses' => 'UsersController@index']); // Access to show object route::get('{users}', ['middleware' => 'permission:users_view', 'as' => 'show', 'uses' => 'UsersController@show']); // Access to export object route::get('export/{format}', ['middleware' => 'permission:users_export', 'as' => 'export', 'uses' => 'UsersController@export']); // Access to create object route::get('create', ['middleware' => 'permission:users_create', 'as' => 'create', 'uses' => 'UsersController@create']); route::post('', ['middleware' => 'permission:users_create', 'as' => 'store', 'uses' => 'UsersController@store']); // Access to disable object route::get('{users}/disable', ['middleware' => 'permission:users_disable', 'as' => 'disable', 'uses' => 'UsersController@disable']); // Access to enable object route::get('{users}/enable', ['middleware' => 'permission:users_enable', 'as' => 'enable', 'uses' => 'UsersController@enable']); // Access to edit object route::get('{users}/edit', ['middleware' => 'permission:users_edit', 'as' => 'edit', 'uses' => 'UsersController@edit']); route::patch('{users}', ['middleware' => 'permission:users_edit', 'as' => 'update', 'uses' => 'UsersController@update']); route::put('{users}', ['middleware' => 'permission:users_edit', 'as' => 'update', 'uses' => 'UsersController@update']); // Access to delete object route::delete('/{users}', ['middleware' => 'permission:users_delete', 'as' => 'destroy', 'uses' => 'UsersController@destroy']); });
<?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. | */ Route::get('/', function () { return View::make('hello'); }); Route::get('/hola', function () { return "Hola !"; }); Route::get('usuario/{id?}', function ($id = null) { return 'Usuario ' . $id; }); Route::controller('/test', 'TestController'); Route::controller('/ini', 'InicioController'); Route::get('/quienessomos', array('uses' => 'InicioController@getQuienessomos')); Route::controller('/index', 'InicioController'); route::get('contacto', array('uses' => 'InicioController@getContacto')); route::get('loggin', array('uses' => 'InicioController@getLoggin')); route::get('servicios', array('uses' => 'InicioController@getServicios')); Route::controller("/", "HomeController");
<?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('welcome'); }); route::get('client', 'ClientController@index'); route::post('client', 'ClientController@store'); route::get('client/{id}', 'ClientController@show'); route::delete('client/{id}', 'ClientController@destroy'); route::put('client/{id}', 'ClientController@update'); route::get('projects/{id}/notes', 'ProjectNotesController@index'); route::post('projects/{id}/notes', 'ProjectNotesController@store'); route::get('projects/{id}/notes/{noteId}', 'ProjectNotesController@show'); route::put('projects/{id}/notes/{noteId}', 'ProjectNotesController@update'); route::delete('projects/{id}/notes/{noteId}', 'ProjectNotesController@destroy'); route::get('projects', 'ProjectsController@index'); route::post('projects', 'ProjectsController@store'); route::get('projects/{id}', 'ProjectsController@show'); route::delete('projects/{id}', 'ProjectsController@destroy'); route::put('projects/{id}', 'ProjectsController@update');
Route::get('revision/tutor/{id}', 'SeguimientoController@seguimientoTutor'); Route::get('revision/cursante/{id}', 'SeguimientoController@seguimientoCursante'); Route::post('revision/guardar', 'SeguimientoController@saveRevision'); Route::get('storage/{archivo}', function ($archivo) { $url = storage_path('app/') . $archivo; //verificamos si el archivo existe y lo retornamos if (\Illuminate\Support\Facades\Storage::exists($archivo)) { return response()->download($url); } //si no se encuentra lanzamos un error 404. abort(404); }); Route::get('storage/Documentacion/{archivo}', function ($archivo) { $public_path = public_path(); $url = $public_path . '/storage/' . $archivo; //verificamos si el archivo existe y lo retornamos if (Storage::exists($archivo)) { return response()->download($url); } //si no se encuentra lanzamos un error 404. abort(404); }); }); //CALENDARIO Route::group(['prefix' => 'calendar', 'namespace' => 'Calendar'], function () { route::get('calendar', 'FullCalendarController@getCalendar'); route::get('calendar/number', 'FullCalendarController@getNumberEvents'); Route::post('calendar/getcalendar', 'FullCalendarController@calendarevents'); Route::post('getModified', 'FullCalendarController@getModified'); Route::get('find', 'FullCalendarController@buscar'); });