当前位置: 首页>>代码示例>>PHP>>正文


PHP route::get方法代码示例

本文整理汇总了PHP中route::get方法的典型用法代码示例。如果您正苦于以下问题:PHP route::get方法的具体用法?PHP route::get怎么用?PHP route::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在route的用法示例。


在下文中一共展示了route::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: function

|
*/
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');
    });
});
开发者ID:josealvjunior,项目名称:CorrecaoPrimeirosCRUD,代码行数:31,代码来源:routes.php

示例2: function

<?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');
开发者ID:affankhan,项目名称:projects_enroll,代码行数:22,代码来源:routes.php

示例3: function

<?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']);
});
开发者ID:yoimbert,项目名称:AbuseIO,代码行数:23,代码来源:SettingsBrands.php

示例4: function

     //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)
开发者ID:claud145,项目名称:ticketeg-web,代码行数:31,代码来源:routes.php

示例5: function

// 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('/');
});
开发者ID:jordone,项目名称:diyonline,代码行数:31,代码来源:routes.php

示例6: function

<?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']);
});
开发者ID:yoimbert,项目名称:AbuseIO,代码行数:27,代码来源:SettingsAccounts.php

示例7: view

    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@gmail.com', 'qiqiechinen')->from('19dewi@gmail.com', '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
开发者ID:dewirizqia,项目名称:SI-Keuangan,代码行数:31,代码来源:routes.php

示例8: function

<?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']);
});
开发者ID:yoimbert,项目名称:AbuseIO,代码行数:19,代码来源:Notes.php

示例9: function

<?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']);
});
开发者ID:ihatehandles,项目名称:AbuseIO,代码行数:23,代码来源:Netblocks.php

示例10: function

    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');*/
开发者ID:Tech-Arays,项目名称:needleapp,代码行数:31,代码来源:routes.php

示例11: function

// 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 () {
开发者ID:wachap,项目名称:incotec-cms,代码行数:31,代码来源:routes.php

示例12: 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 = 'api.diy';
    $password = 'diyapi';
    $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');
开发者ID:jordone,项目名称:diyonline,代码行数:32,代码来源:routes.php

示例13: function

<?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');
});
开发者ID:eduarguzher,项目名称:BattleshipV2.0,代码行数:29,代码来源:routes.php

示例14: function

<?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']);
});
开发者ID:ihatehandles,项目名称:AbuseIO,代码行数:10,代码来源:Profile.php

示例15: run

 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();
 }
开发者ID:reang,项目名称:Dingo-Framework,代码行数:72,代码来源:bootstrap.php


注:本文中的route::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。