コード例 #1
0
ファイル: routes.php プロジェクト: andreikainer/kuj_abol
    /*-- Password reset Page --*/
    Route::get(LaravelLocalization::transRoute('routes.account/reset'), 'Auth\\PasswordController@getEmail');
    Route::post(LaravelLocalization::transRoute('routes.password/email'), 'Auth\\PasswordController@postEmail');
    Route::get(LaravelLocalization::transRoute('routes.password/reset') . '/{token}', 'Auth\\PasswordController@getReset');
    Route::post(LaravelLocalization::transRoute('routes.password/reset') . '/{token}', 'Auth\\PasswordController@postReset');
    /*-- Userpanel, Pages --*/
    Route::get(LaravelLocalization::transRoute('routes.account') . '/{username}', 'UserpanelController@show');
    Route::post(LaravelLocalization::transRoute('routes.account') . '/{username}', 'UserpanelController@update');
    Route::get(LaravelLocalization::transRoute('routes.account/delete') . '/{username}', 'UserpanelController@delete');
    Route::get(LaravelLocalization::transRoute('routes.favourite/add') . '/{id}', 'UserpanelController@addFavourite');
    Route::get(LaravelLocalization::transRoute('routes.favourite/remove') . '/{id}', 'UserpanelController@removeFavourite');
    Route::get(LaravelLocalization::transRoute('routes.toggle') . '/{id}', 'UserpanelController@edit');
    /*-- Adminpanel Page --*/
    Route::get(LaravelLocalization::transRoute('routes.admin'), 'AdminController@index');
    Route::get(LaravelLocalization::transRoute('routes.admin/edit-project') . '/{slug}', 'AdminController@getEditProject');
    Route::patch(LaravelLocalization::transRoute('routes.admin/edit-project') . '/{slug}', 'AdminController@patchEditProject');
    Route::get(LaravelLocalization::transRoute('routes.admin/approve-project') . '/{slug}', 'AdminController@getApproveProject');
    Route::get(LaravelLocalization::transRoute('routes.sponsor/remove') . '/{id}', 'AdminController@removeSponsor');
    Route::get(LaravelLocalization::transRoute('routes.sponsor/relist') . '/{id}', 'AdminController@relistSponsor');
    Route::post(LaravelLocalization::transRoute('routes.sponsor/add'), 'AdminController@addSponsor');
    /*-- Newsletter sign up --*/
    Route::post(LaravelLocalization::transRoute('routes.newsletter'), 'ContactFormController@postNewsletter');
    /*-- Payment --*/
    Route::controller('paytest', 'PaymentController');
    /*-- Share Project via Email --*/
    Route::post(LaravelLocalization::transRoute('routes.share-project'), 'ProjectsController@shareProject');
    /** ADD ADDITIONAL ROUTES INSIDE HERE (INSIDE OF THIS GROUP) **/
    //Route::get(LaravelLocalization::transRoute('routes.<key>'), '<Controller>@<Method>');
});
/** OTHER PAGES THAT SHOULD NOT BE LOCALIZED for example just German pages**/
// Route::get('test', '<Controller>@<Method>');
コード例 #2
0
ファイル: helpers.php プロジェクト: linhntaim/katniss
function transRoute($route)
{
    return LaravelLocalization::transRoute('routes.' . $route);
}