controllers() public static method

Register an array of controllers with wildcard routing.
Deprecation: since version 5.2.
public static controllers ( array $controllers ) : void
$controllers array
return void
示例#1
0
<?php

Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'errors' => 'ErrorController', 'page' => 'PageController']);
Route::get('/', function () {
    return redirect('page/home');
});
Route::get('day/generate', ['as' => 'day.generate', 'uses' => 'DayController@generate']);
Route::get('day/create/{date?}', ['as' => 'day.create', 'uses' => 'DayController@create']);
Route::get('recette/categorie/{tag?}', ['as' => 'recipe.category', 'uses' => 'RecipeController@index']);
Route::get('ingredient/categorie/{tag?}', ['as' => 'ingredient.category', 'uses' => 'IngredientController@index']);
Route::resource('day', 'DayController');
Route::resource('recipe', 'RecipeController');
Route::resource('ingredient', 'IngredientController');
Route::resource('tag', 'TagController');
Route::resource('supply', 'SupplyController');
示例#2
0
<?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('/', 'HomeController@getIndex');
Route::controllers(['admin' => 'AdminController', 'user' => 'UserController', 'auth' => 'AuthController', 'article' => 'ArticleController', 'comment' => 'CommentController', 'test' => 'TestController', 'home' => 'HomeController', 'release' => 'Home\\ReleaseController', 'visitor' => 'VisitorController']);
/**
 * 前台路由组
 */
//Route::group(array('prefix' => 'home'), function()
//{
//    $HomeController = 'HomeController@';
//    //
//    Route::get('article/{$id}', $HomeController.'getArticle');
//    Route::post('comment/{$id}', $HomeController.'postComment');
//
//});
/**
 * 管理权限路由组
 */
Route::group(array('prefix' => 'perm'), function () {
    $PermController = 'PermController@';
    //团队职务
示例#3
0
文件: routes.php 项目: Timures/clubon
<?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.
|
*/
// Static Pages routes
Route::get('/', 'PagesController@index');
Route::get('/about.html', 'PagesController@about');
Route::get('/contacts.html', 'PagesController@contacts');
// 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');
Route::controllers(['password' => 'Auth\\PasswordController']);
示例#4
0
<?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::controllers(['plotter' => 'PlotterController']);
             Route::get('{report}/dismiss', 'ReportsController@getDismiss');
             Route::get('{report}/dismiss-ip', 'ReportsController@getDismissIp');
             Route::get('{post}/dismiss-post', 'ReportsController@getDismissPost');
             Route::get('{report}/promote', 'ReportsController@getPromote');
             Route::get('{post}/promote-post', 'ReportsController@getPromotePost');
             Route::get('{report}/demote', 'ReportsController@getDemote');
             Route::get('{post}/demote-post', 'ReportsController@getDemotePost');
         });
     });
     Route::group(['namespace' => 'Boards', 'prefix' => 'board'], function () {
         Route::controllers(['{board}/staff/{user}' => 'StaffingController', '{board}/staff' => 'StaffController', '{board}/role/{role}' => 'RoleController', '{board}/roles' => 'RolesController', '{board}' => 'ConfigController']);
     });
     Route::group(['namespace' => 'Site', 'prefix' => 'site'], function () {
         Route::get('/', 'SiteController@getIndex');
         Route::get('phpinfo', 'SiteController@getPhpinfo');
         Route::controllers(['config' => 'ConfigController']);
     });
     Route::group(['namespace' => 'Users', 'prefix' => 'users'], function () {
         Route::get('/', 'UsersController@getIndex');
     });
     Route::group(['namespace' => 'Roles', 'prefix' => 'roles'], function () {
         Route::controller('permissions/{role}', 'PermissionsController');
         Route::get('permissions', 'RolesController@getPermissions');
     });
 });
 /*
 | Page Controllers
 | Catches specific strings to route to static content.
 */
 if (env('CONTRIB_ENABLED', false)) {
     Route::get('contribute', 'PageController@getContribute');
示例#6
0
    Route::get('checkout/placeOrder', ['as' => 'store.checkout.place', 'uses' => 'CheckoutController@place']);

    Route::get('account/orders', ['as' => 'store.account.orders', 'uses' => 'AccountController@orders']);

});

Route::get('evento', function() {
    //\Illuminate\Support\Facades\Event::fire(new \CodeCommerce\Events\CheckoutEvent());
    // mesmo que:
    event(new \CodeCommerce\Events\CheckoutEvent());
});

Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
    'test' => 'TestController',
]);

Route::group(['prefix' => 'admin', 'middleware' => 'auth.admin'], function () {

    Route::group(['prefix' => 'categories'], function () {
        Route::get('/', ['as' => 'admin.categories', 'uses' => 'AdminCategoriesController@index']);
        Route::get('create', ['as' => 'admin.categories.create', 'uses' => 'AdminCategoriesController@create']);
        Route::post('store', ['as' => 'admin.categories.store', 'uses' => 'AdminCategoriesController@store']);
        Route::get('show/{id}', ['as' => 'admin.categories.show', 'uses' => 'AdminCategoriesController@show']);
        Route::get('edit/{id}', ['as' => 'admin.categories.edit', 'uses' => 'AdminCategoriesController@edit']);
        Route::put('update/{id}', ['as' => 'admin.categories.update', 'uses' => 'AdminCategoriesController@update']);
        Route::get('destroy/{id}', ['as' => 'admin.categories.destroy', 'uses' => 'AdminCategoriesController@destroy']);
    });
示例#7
0
<?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('pages.home');
});
//Route::get('my-profile', 'ProfileController@showProfile');
//Route::get('edit-profile' ,'ProfileController@showProfile');
Route::controllers(['profile' => 'ProfileController', 'user' => 'UserController', '/' => 'HomeController']);
示例#8
0
<?php

//$router->get(trans('routes.locale'), ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
//
//get('/', ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::controllers(['service' => 'LayoutController']);
//    Route::get('contact', 'WelcomeController@contact');
//Route::get('contacts', function() {
//    $data = ['name' => 'Enes Anbar'];
//    Mail::send('layout.mail', $data, function($message) {
//        $message->to('*****@*****.**')
//            ->subject('Welcome to My Website');
//    });
//});
//post('message/new', ['as' => 'message.new', 'uses' => 'MessagesController@store']);
$router->resource('articles', 'ArticlesController');
$router->resource('news', 'NewsController');
$router->resource('comments', 'CommentsController');
$router->resource('home', 'HomeController');
$router->resource('messages', 'MessagesController');
Route::resource('adminOrders', 'AdminOrdersController', array('except' => array('store')), ['middleware' => 'access', 'permissions' => 'order_view']);
post('adminOrders', ['as' => 'adminOrders.store', 'uses' => 'AdminOrdersController@store']);
Route::resource('users', 'UserController', array('except' => array('store')), ['middleware' => 'access', 'permissions' => 'user_view']);
post('users', ['as' => 'users.store', 'uses' => 'UserController@store']);
post('comments/request', ['as' => 'comments.request', 'uses' => 'CommentsController@storeRequest']);
//    post('orders/store', ['as' => 'orders.storeAdmin', 'uses' => 'AdminOrderController@storeAdmin']);
//post('home/update', ['as' => 'home.update', 'uses' => 'AuthController@update']);
get('/', ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
get('basket', ['as' => 'basket', 'uses' => 'BasketController@index']);
get('basket_guest', ['as' => 'basket.guest', 'uses' => 'BasketController@basketGuest']);
示例#9
0
| 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.
|
*/
//// Authentication routes...
//Route::get('login', 'Auth\AuthController@getLogin');
//Route::post('login', 'Auth\AuthController@postLogin');
//Route::get('logout', 'Auth\AuthController@getLogout');
//
//// Registration routes...
//Route::get('register', 'Auth\AuthController@getRegister');
//Route::post('register', 'Auth\AuthController@postRegister');
Route::group(['prefix' => '/', 'namespace' => 'Admin', 'middleware' => 'auth'], function () {
    Route::get('', ['as' => 'home', function () {
        return redirect()->to('clientes');
    }]);
    Route::get('reporte', 'PdfController@transacciones');
    Route::resource('clientes', 'ClientesController');
    Route::resource('pagos', 'PagosController');
    Route::resource('tipoMonedas', 'TipoMonedas');
    Route::resource('sincronizar', 'SincronizarController');
    Route::resource('bitacora', 'BitacorasController');
    Route::POST('bitacoraPagos', 'BitacorasController@pagos');
    Route::get('sendData/{id}', 'SincronizarController@enviarDatos');
});
Route::controllers(['auth' => 'Authentication\\AuthController']);
示例#10
0
<?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('/', 'HomeController@index');
Route::controller('/home', 'HomeController');
Route::controller('/user', 'UserController');
include 'pageroutes.php';
include 'moduleroutes.php';
Route::get('/restric', function () {
    return view('errors.blocked');
});
Route::group(['middleware' => 'auth'], function () {
    Route::get('core/elfinder', 'Core\\ElfinderController@getIndex');
    Route::post('core/elfinder', 'Core\\ElfinderController@getIndex');
    Route::controller('/dashboard', 'DashboardController');
    Route::controllers(['core/users' => 'Core\\UsersController', 'core/logs' => 'Core\\LogsController', 'core/pages' => 'Core\\PagesController', 'core/groups' => 'Core\\GroupsController', 'core/template' => 'Core\\TemplateController']);
});
Route::group(['middleware' => 'auth', 'middleware' => 'sximoauth'], function () {
    Route::controllers(['sximo/menu' => 'Sximo\\MenuController', 'sximo/config' => 'Sximo\\ConfigController', 'sximo/module' => 'Sximo\\ModuleController', 'sximo/tables' => 'Sximo\\TablesController']);
});
示例#11
0
<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in 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.
|
*/
/*
|--------------------------------------------------------------------------
| 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::controllers(['' => 'Controller']);
});
示例#12
0
文件: routes.php 项目: rxfu/jspx
<?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 redirect('home');
});
Route::get('home', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'user' => 'UserController', 'group' => 'GroupController', 'permission' => 'PermissionController', 'pjzb' => 'PjzbController', 'pjbz' => 'PjbzController', 'pfdj' => 'PfdjController', 'pfjg' => 'PfjgController', 'setting' => 'SettingController']);
示例#13
0
<?php

Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
    Route::controllers(['themes' => '\\Scrobot\\Themes\\ThemeController']);
});
示例#14
0
<?php

/**
 * User : YuGang Yang
 * Date : 7/27/15
 * Time : 15:30
 * Email: smartydroid@gmail.com
 */
Route::get('/', function () {
    return redirect('/admin/auth/login');
});
Route::controllers(['admin/auth' => config('forone.auth.administrator_auth_controller', '\\Forone\\Admin\\Controllers\\Auth\\AuthController')]);
//admin
Route::group(['prefix' => 'admin', 'middleware' => ['admin.auth', 'admin.permission:admin']], function () {
    Route::group(['namespace' => '\\Forone\\Admin\\Controllers\\Permissions'], function () {
        Route::resource('roles', 'RolesController');
        Route::resource('permissions', 'PermissionsController');
        Route::resource('admins', 'AdminsController');
        Route::resource('navs', 'NavsController');
        Route::post('roles/assign-permission', ['as' => 'admin.roles.assign-permission', 'uses' => 'RolesController@assignPermission']);
        Route::post('admins/assign-role', ['as' => 'admin.roles.assign-role', 'uses' => 'AdminsController@assignRole']);
        // Image console
        Route::get('images/{images}/destroyImage', 'ImagesController@destroyImage');
        Route::resource('images', 'ImagesController');
    });
});
//upload
Route::get('/admin/qiniu/upload-token', ['as' => 'admin.qiniu.upload-token', 'uses' => 'Forone\\Admin\\Controllers\\Upload\\QiniuController@token']);
示例#15
0
<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in 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 redirect('user/register');
});
/*
|--------------------------------------------------------------------------
| 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::controllers(['user' => 'UserController']);
});
<?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');
// User Page
Route::get('home-admin', 'AdminHomeController@index');
// Admin Page
Route::controllers(['user' => 'Auth\\AuthController', 'admin' => 'Auth\\AuthAdminController', 'password-user' => 'Auth\\PasswordController']);
示例#17
0
Route::get('home', 'HomeController@index');
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::controller('/json', 'Json\\JsonController');
Route::controller('/angular', 'Angular\\ProductApiController');
Route::get('/blog/tes', function () {
    return "Halo, bro!";
});
Route::get('/halo-juga', 'SiteController@haloJuga');
Route::get('/authors', array('uses' => 'authors@index'));
Route::get('author/{id}', array('as' => 'author', 'uses' => 'authors@view'));
Route::get('authors/new', array('as' => 'new_author', 'uses' => 'authors@add'));
Route::post('authors/create', array('uses' => 'authors@create'));
//ecommerce
Route::get('/', array('uses' => 'storeController@getIndex'));
Route::get('index/', array('uses' => 'storeController@getIndex'));
Route::controllers(['/admin/products' => 'ProductsController', 'store' => 'StoreController', 'users' => 'UsersController']);
$router->group(['middleware' => 'adminauth'], function ($router) {
    $router->controller('/admin/categories', 'CategoriesController');
    $router->controller('/admin/products', 'ProductsController');
});
//exception create comments
Route::post('/blog/admin/comments/create', 'Blog\\CommentsController@postCreate');
Route::controller('/blog/users', 'Blog\\UsersController');
//blog route with authentication
$router->group(['middleware' => 'blogauth'], function ($router) {
    $router->controller('blog/admin/categories', 'Blog\\CategoriesController');
    $router->controller('/blog/admin/posts', 'Blog\\PostsController');
    $router->controller('/blog/admin/comments', 'Blog\\CommentsController');
    $router->controller('/blog/admin/galeries', 'Blog\\GaleriesController');
});
//blog route without authentication
示例#18
0
| 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('/', 'Auth\\AuthController@getLogin');
Route::get('inicio', 'HomeController@index');
/*Route::get('caj','CajeroController@prueba');*/
/*Route::resource('user', 'UserController');
Route::resource('personal_usuarios', 'Personal_UsuariosController');
Route::resource('personal', 'PersonalController');
Route::resource('rol', 'RolController');*/
Route::controllers(['usuario' => 'Auth\\AuthController', 'cajero' => 'CajeroController', 'cocina' => 'CocinaController', 'administrador' => 'AdministradorController', 'personal' => 'PersonalController', 'usuarios' => 'UserController', 'gerente' => 'GerenteController', 'mesero' => 'MeseroController', 'encargadomeseros' => 'DepaMeseroController', 'reportes' => 'ReportesController']);
Route::get('ordenes', 'CajeroController@ordenes');
Route::get('example2', function () {
    /*$toda= Carbon::now()->setTime(00,00,00);*/
    $toda = Carbon::toDay()->toDateString();
    /*return $toda;*/
    /*return Orden::where('DATE(created_at)','=',$toda)->count();	*/
    /*return Orden::all();*/
    /*$users = Orden::where(DB::raw('DATE(created_at)'), $toda)->get()->sum('platillo_count');*/
    /*return $users;*/
    /*return Orden::where('created_at','=>',$toda.' 00:00:00')->get();*/
    /*$total=Orden::where(DB::raw('DATE(created_at)'), $toda)->with('platillos')->get()->sum('platillo_total');
    	return $total;*/
    /*return Auth::user()->personal->id;*/
    /*return DB::select(DB::raw("SELECT
    		(SELECT SUM(ventas.total) FROM ventas WHERE MONTH (ventas.fecha) = '01') 'Enero',
<?php

/**
 * User : YuGang Yang
 * Date : 7/27/15
 * Time : 15:30
 * Email: smartydroid@gmail.com
 */
Route::get('/', function () {
    return redirect('/admin/auth/login');
});
Route::controllers(['admin/auth' => 'Forone\\Admin\\Controllers\\Auth\\AuthController']);
//admin
Route::group(['prefix' => 'admin', 'middleware' => ['admin.auth', 'admin.permission:admin']], function () {
    Route::group(['namespace' => '\\Forone\\Admin\\Controllers\\Permissions'], function () {
        Route::resource('roles', 'RolesController');
        Route::resource('permissions', 'PermissionsController');
        Route::resource('admins', 'AdminsController');
        Route::resource('navs', 'NavsController');
        Route::post('roles/assign-permission', ['as' => 'admin.roles.assign-permission', 'uses' => 'RolesController@assignPermission']);
        Route::post('admins/assign-role', ['as' => 'admin.roles.assign-role', 'uses' => 'AdminsController@assignRole']);
    });
});
//upload
Route::get('/admin/qiniu/upload-token', ['as' => 'admin.qiniu.upload-token', 'uses' => 'Forone\\Admin\\Controllers\\Upload\\QiniuController@token']);
示例#20
0
  <?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('about', 'AboutController@index');
Route::get('contact-us', ['as' => 'contact-us', 'uses' => 'ContactController@getIndex']);
Route::post('contact-us', ['as' => 'contact-us-save', 'uses' => 'ContactController@postIndex']);
Route::get('team-sheet/{event_unique_link}/{yourein?}', ['as' => 'team-sheet', 'uses' => 'TeamSheetController@getIndex']);
Route::get('team-sheet/opt-out/{event_unique_link}/{id}', ['as' => 'team-sheet-delete', 'uses' => 'TeamSheetController@optOut']);
Route::post('team-sheet/save/{event_unique_link}', ['as' => 'team-sheet-save', 'uses' => 'TeamSheetController@postSave']);
Route::get('matches/setup-next-week/{event_unique_link}', ['as' => 'setup-next-week', 'uses' => 'SetUpNextWeekController@index']);
Route::controllers(['matches' => 'MatchesController']);
Route::get('managers-office/cancel/{event_unique_link}', ['as' => 'managers-office-cancel', 'uses' => 'ManagersOfficeController@deleteMatch']);
Route::get('managers-office/edit/{event_unique_link}', ['as' => 'managers-office-edit', 'uses' => 'ManagersOfficeController@edit']);
Route::patch('managers-office/update/{event_unique_link}', ['as' => 'managers-office-update', 'uses' => 'ManagersOfficeController@update']);
Route::get('managers-office/{event_unique_link}/{isNew?}', ['as' => 'managers-office-index', 'uses' => 'ManagersOfficeController@index'])->where(['isNew', "new"]);
Route::get('fixture-list', ['as' => 'fixture-list', 'middleware' => '\\PlayFooty\\Http\\Middleware\\IsAMatchOrganiser', 'uses' => 'FixtureListController@index']);
Route::get('email-testing/event/{event_unique_link}/template/{template}', ['uses' => 'EmailTestingController@getMessage']);
示例#21
0
<?php

Route::get('admin', function () {
    return Redirect::to('admin/menu');
});
Route::controllers(['auth' => 'Auth\\AuthController']);
Route::group(['middleware' => ['auth', 'admin']], function () {
    Route::controllers(['admin/menu' => 'Admin\\MenuController', 'admin/portfolio' => 'Admin\\PortfolioController', 'admin/services' => 'Admin\\ServicesController', 'admin/portfolio-images' => 'Admin\\PortfolioImagesController']);
    Route::get('/', ['uses' => 'HomeController@index', 'as' => 'home']);
    Route::controllers(['portfolio' => 'PortfolioController']);
    Route::resource('admin/travels', 'Admin\\TravelsController');
    Route::resource('admin/travel_photos', 'Admin\\TravelPhotosController');
    Route::resource('/travels', 'TravelsController');
    Route::any("/{slug}", array("as" => "content", "uses" => "MenuController@content"));
});
示例#22
0
<?php

Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
    Route::controllers(['pages' => '\\Scrobot\\Pages\\PageController']);
});
示例#23
0
|--------------------------------------------------------------------------
|
| 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');
// 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');
Route::get('tcpdf', 'TcpdfController@index');
Route::get('tcpdf/archivo', 'TcpdfController@archivo');
Route::get('tcpdf/descargar', 'TcpdfController@descargar');
Route::get('merkurio', 'MerkurioController@index');
Route::get('merkurio/archivo', 'MerkurioController@archivo');
Route::get('merkurio/redirectToProvider', 'MerkurioController@redirectToProvider');
Route::get('merkurio/handleProviderCallback', 'MerkurioController@handleProviderCallback');
Route::get('merkurio/xls', 'MerkurioController@xls');
Route::controller('admin', 'AdminController');
Route::controller('categorias', 'CategoriasController');
Route::controller('redes', 'RedesController');
Route::controller('fluent', 'FluentController');
Route::controller('eventos', 'EventosController');
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'eloquent' => 'EloquentController']);
示例#24
0
<?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::controllers(['auth' => 'Yuyinitos\\SocialAuthenticator\\AuthController', 'password' => 'Yuyinitos\\SocialAuthenticator\\PasswordController']);
Route::get('socialAuth/logout', function () {
    return $this->app['authenticator']->logout();
});
Route::get('socialAuth/user', function () {
    $user = Yuyinitos\SocialAuthenticator\Models\User::find(\Auth::id());
    return $user;
});
Route::get('socialAuth/{provider?}', function ($provider = null) {
    return $this->app['authenticator']->login($provider);
});
Route::get('activate/{code}', 'Yuyinitos\\SocialAuthenticator\\AuthController@accountIsActive');
示例#25
0
    Route::get('administrador/agregarterminado', ['as' => 'administrador.agregarterminado', 'uses' => 'AdminActionController@addTerminado']);
    Route::post('administrador/storeterminado/{id_user}', ['as' => 'administrador.store.terminado', 'uses' => 'AdminActionController@storeTerminado']);
    Route::resource('administrador', 'AdminActionController');
});
Route::group(['middleware' => ['auth', 'is_type']], function () {
    Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
    Route::get('home', 'HomeController@index');
});
Route::get('bienvenida', 'WelcomeController@index');
Route::get('listadeproyectos', ['as' => 'listarproyectos', 'uses' => 'WelcomeController@listarproyectos']);
Route::get('info-proyecto/{id}', ['as' => 'vermas', 'uses' => 'WelcomeController@verMas']);
Route::get('info-proyecto-terminado/{id}', ['as' => 'vermasterminado', 'uses' => 'WelcomeController@verMasTerminado']);
Route::get('iniciar-sesion', ['as' => 'login', 'uses' => 'Auth\\AuthController@getLogin']);
Route::post('iniciar-sesion', ['as' => 'login', 'uses' => 'Auth\\AuthController@postLogin']);
Route::get('salir-sesion', ['as' => 'logout', 'uses' => 'Auth\\AuthController@getLogout']);
Route::controllers(["auth" => "Auth\\AuthController", "password" => "Auth\\PasswordController"]);
Route::get('verarchivo/{nombre}', ['as' => 'archivo', function ($nombre) {
    $url = "project/" . $nombre;
    return redirect()->to($url);
}]);
Route::get('atras', ['as' => 'atras', function () {
    return redirect()->back(1);
}]);
// Routes del Profesor **********************************
Route::group(['middleware' => ['auth', 'is_profesor']], function () {
    Route::get('profesor/consultarproyecto', ['as' => 'profesor.consultarproyecto', 'uses' => 'ProfesorActionController@consultProject']);
    Route::get('profesor/evaluarproyecto/{id}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
    Route::get('profesor/verpdfs/{id_user}', ['as' => 'profesor.verpdfs', 'uses' => 'ProfesorActionController@verPdfs']);
    Route::delete('profesor/destroypdf/{id}', ['as' => 'profesor.destroypdf', 'uses' => 'ProfesorActionController@destroyPdf']);
    Route::get('profesor/verevaluaciones/{id}', ['as' => 'profesor.verevaluaciones', 'uses' => 'ProfesorActionController@showEvaluations']);
    Route::get('profesor/evaluarproyecto/{id_user}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
示例#26
0
<?php

Route::get('/', 'TopController@index');
Route::get('home', 'HomeController@index');
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'search' => 'SearchController', 'classes' => 'ClassesController', 'ranking' => 'RankingController', 'tag' => 'TagController', 'mypage' => 'MyPageController', 'term' => 'TermController', 'help' => 'HelpController', 'about' => 'AboutController', 'campaign' => 'CampaignController']);
/* 以下API */
// TODO : status codeを返す
// api root
Route::get('/api/', function () {
    return "API root";
});
// 全授業を取得
Route::get('/api/classes/', function () {
    $classes = DB::table('classes')->get();
    return Response::json($classes);
});
// 一授業のみを取得
Route::get('/api/classes/{class_id}', function ($class_id) {
    $class = DB::table('classes')->where('class_id', $class_id)->first();
    return Response::json($class);
});
// 一授業のコメントを取得
Route::get('/api/classes/{class_id}/reviews/', function ($class_id) {
    $class = DB::table('review')->where('class_id', $class_id)->get();
    return Response::json($class);
});
// 一授業の特定の1コメントを取得
Route::get('/api/classes/{class_id}/reviews/{rev_id}', function ($class_id, $rev_id) {
    $class = DB::table('review')->where('class_id', $class_id)->where('review_id', $rev_id)->get();
    return Response::json($class);
});
示例#27
0
| 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('/test', function () {
    $user = Meatings\User::find(1);
    $client = new \Google_Client();
    $client->setApplicationName(env('GOOGLE_APP_NAME'));
    $client->setDeveloperKey($user->token);
    $service = new Google_Service_Calendar($client);
    $calendarList = $service->calendarList->listCalendarList();
    while (true) {
        foreach ($calendarList->getItems() as $calendarListEntry) {
            echo $calendarListEntry->getSummary();
        }
        $pageToken = $calendarList->getNextPageToken();
        if ($pageToken) {
            $optParams = array('pageToken' => $pageToken);
            $calendarList = $service->calendarList->listCalendarList($optParams);
        } else {
            break;
        }
    }
});
Route::get('/', 'WelcomeController@index');
Route::get('home', 'HomeController@index');
Route::controllers(['auth' => 'Auth\\AuthController']);
Route::get('login', '\\Meatings\\Http\\Controllers\\Auth\\AuthController@login');
Route::resource('users', '\\Meatings\\Http\\Controllers\\UserController');
Route::get('user/{user}/calendar', ['as' => 'user.calendar', 'uses' => 'CalendarController@show']);
Route::get('user/{user}/create', ['as' => 'user.calendar.create', 'uses' => 'CalendarController@create']);
示例#28
0
<?php

Route::controllers(['products' => 'Sample\\Controllers\\ProductController']);
示例#29
0
<?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::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
示例#30
0
<?php

Route::get('/', 'PhotoController@getIndex');
Route::get('home', 'HomeController@index');
Route::get('recents', 'PhotoController@getRecents');
Route::get('search', 'PhotoController@getSearch');
Route::controllers(['photo' => 'PhotoController', 'auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'admin/users' => 'Admin\\UserController', 'admin/photos' => 'Admin\\PhotoController']);