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


PHP route::resource方法代码示例

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


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

示例1: 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('/', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::get('home', 'HomeController@index');
Route::resource('/contact', 'HomeController@contact');
route::resource('user', 'UsersController');
Route::get('profile', 'UsersController@showProfile');
Route::bind('users', function ($value, $route) {
    return App\User::whereId($value)->first();
});
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
开发者ID:rafaelpv,项目名称:tpms-dashboard,代码行数:21,代码来源:routes.php

示例2: function

    Route::get('/', 'PagesController@Index');
    Route::get('/about', 'PagesController@about');
    Route::post('user/{id}/feedback', 'Insertions\\FeedbacksController@create');
    Route::resource('posts', 'Insertions\\PostsController');
    Route::resource('adverts', 'Insertions\\AdvertsController');
    Route::post('posts/{postId}/comments/', 'Insertions\\CommentsController@create');
    Route::get('user/{id}', 'UsersController@show');
    Route::get('dashboard', 'UsersController@edit');
    Route::put('dashboard/{id}', 'UsersController@update');
    Route::get('upload', function () {
        return View::make('users.upload');
    });
    Route::post('upload', 'UploadController@upload');
    //invite
    Route::resource('invite', 'InvitesController');
    route::resource('/auth/activate', 'InviteRegisterController');
    //admin panel
    Route::get('/admin', 'Admin\\AdminController@index');
    Route::resource('/admin/users', 'Admin\\AdminUsersController');
    Route::resource('/admin/roles', 'Admin\\RolesController');
    Route::resource('/admin/permissions', 'Admin\\PermissionsController');
});
Route::post('about', 'EmailController@showForm');
Route::post('about', 'EmailController@handleFormPost');
Route::get('setlocale/{locale}', function ($locale) {
    if (in_array($locale, \Config::get('app.locales'))) {
        # ѕровер¤ем, что у пользовател¤ выбран доступный ¤зык
        Session::put('locale', $locale);
        # » устанавливаем его в сессии под именем locale
    }
});
开发者ID:aArenar54rus,项目名称:bookcross,代码行数:31,代码来源:routes.php

示例3:

<?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']);
route::resource('coments', 'ComentsController');
route::get('newmatch', 'ComentsController@resetmatch');
开发者ID:eduarguzher,项目名称:FinalWeb,代码行数:17,代码来源:routes.php

示例4: 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

示例5: function

<?php

Route::group(['middleware' => 'web'], function () {
    Route::get('/', ['as' => 'accueil', function () {
        return view('accueil');
    }]);
    Route::get('contact', ['as' => 'contactus', function () {
        return view('contact.contact');
    }]);
    Route::get('about', ['as' => 'about', function () {
        return view('about');
    }]);
    Route::auth();
    Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function () {
        route::resource('posts', 'PostsController');
        route::get('posts/validate', ['as' => 'admin.posts.valid', 'uses' => 'PostsController@valid']);
    });
    Route::resource('posts', 'PostsController');
    Route::get('filter', function () {
        return view('welcome');
    });
    Route::group(['namespace' => 'Coaching', 'prefix' => 'coaching', 'middleware' => 'auth'], function () {
        Route::resource('injuries', 'InjuriesController');
        Route::resource('mailing', 'MailingController');
        Route::resource('calendar', 'CalendarController');
        Route::resource('document', 'DocumentController');
        Route::get('reminder/list', ['as' => 'coaching.reminder.list', 'uses' => 'ReminderController@listing']);
        Route::resource('reminder', 'ReminderController');
        Route::get('home', function () {
            return view('coaching.home');
        });
开发者ID:ezCat,项目名称:wdinnove-library,代码行数:31,代码来源:routes.php

示例6: function

*/
Route::group(['middleware' => ['web', 'auth']], function () {
    Route::resource('/admin/articulo', 'PostController');
    Route::get('/admin/blogs', 'PsController@index');
    Route::resource('/admin/Template', 'TemplateController');
});
Route::group(['middleware' => ['web', 'auth', 'home']], function () {
    Route::get('/home', 'HomeController@index');
});
Route::group(['middleware' => ['web']], function () {
    Route::auth();
    Route::resource('/admin/fotos', 'imagesController');
    Route::get('/admin/galeria', 'ImageController@index');
});
// Restaurant ..
Route::group(['middleware' => ['web', 'auth', 'restaurant']], function () {
    Route::get('/admin/menu', 'MenusController@index');
    Route::resource('/menu', 'MenuController');
});
// Bar ..
Route::group(['middleware' => ['web', 'auth', 'bar']], function () {
    Route::get('/admin/drink', 'DrinksController@index');
    Route::resource('/drink', 'DrinkController');
    Route::get('/admin/events', 'EventsController@index');
    route::resource('/event', 'EventController');
    route::post('/file', 'EventController@uplad');
});
// Profiles ...
Route::group(['middleware' => ['web']], function () {
    Route::get('/profiles/{slug}', 'ProfileController@template');
});
开发者ID:Carlos-Stgo,项目名称:Apppromo,代码行数:31,代码来源:routes.php

示例7: function

     Route::resource('deposito', 'Api\\Caixa\\DepositoController');
     Route::resource('retirada', 'Api\\Caixa\\RetiradaController', ['only' => ['store', 'update', 'destroy']]);
     Route::get('retirada/today', 'Api\\Caixa\\RetiradaController@getPullOutDay');
 });
 //    Route::group(['prefix'=>'reports'], function(){
 //
 //    });
 // Setting Routes
 Route::group(['prefix' => 'setting'], function () {
     Route::resource('profession', 'Api\\Setting\\ProfessionController');
     Route::resource('emolumento', 'Api\\Setting\\EmolumentoController');
     Route::resource('registro', 'Api\\Setting\\RegistroController');
     Route::resource('inventario', 'Api\\Setting\\InventarioController');
     Route::resource('taxa', 'Api\\Setting\\TaxaController', ['except' => ['create']]);
     route::resource('queue_act', 'Api\\Setting\\SettingAct', ['only' => ['index', 'store', 'update', 'destroy']]);
     route::resource('attendant', 'Api\\Setting\\SettingAttendant', ['only' => ['index', 'store', 'update', 'destroy']]);
 });
 // Setting Routes to Configs
 Route::group(['prefix' => 'config'], function () {
     // Bancos
     Route::resource('bancos', 'Api\\Setting\\Config\\BancosController');
     Route::get('bancos/byCode/{code}', 'Api\\Setting\\Config\\BancosController@getBancoByCode');
     // Cheques
     Route::resource('cheques', 'Api\\Setting\\Config\\ChequesController');
     // ITBI
     Route::resource('itbis', 'Api\\Setting\\Config\\ItbisController');
     // Logradouros
     Route::resource('logradouros', 'Api\\Setting\\Config\\LogradourosController');
     // Matriculas
     Route::resource('matriculas', 'Api\\Setting\\Config\\MatriculasController');
     // Motivos Cheques Devolvidos
开发者ID:paulopanissa,项目名称:nNotary,代码行数:31,代码来源:routes.php

示例8:

    Route::get('tasklogs/timelime/{id}', 'TasklogController@timeline');
    Route::get('download/task/{id}', 'DownloadController@task');
    Route::get('download/tasklog/{id}', 'DownloadController@tasklog');
    Route::get('upload/employee/', 'UploadController@employee');
    Route::post('upload/employee/', 'UploadController@employeeUpload');
    Route::post('upload/cdma', 'UploadController@cdmaUpload');
    Route::get('upload/phone/', 'UploadController@phone');
    Route::post('upload/phone', 'UploadController@phoneUpload');
    Route::post('upload/bill', 'UploadController@billUpload');
    Route::resource('employees', 'EmployeeController');
    Route::resource('phones', 'PhoneController');
    route::get('/delete/employee/{id}', 'DeleteController@employee');
    route::get('/delete/phone/{id}', 'DeleteController@phone');
    route::get('/delete/department/{id}', 'DeleteController@department');
    Route::get('/delete/rack/{id}', 'DeleteController@rack');
    Route::get('/delete/cdma/{id}', 'DeleteController@cdma');
    route::post('/mobilefees/{months?}', 'MobilefeeController@index');
    route::post('/bills/{months?}', 'BillListController@index');
    route::resource('mobilefees', 'MobilefeeController');
    route::resource('departments', 'DepartmentController');
    route::resource('cdmas', 'CdmaController');
    route::resource('devices', 'DeviceController');
    route::resource('taskforms', 'TaskFormController');
    route::get('/reporting/task/excel/{id}', "ReportController@taskexcel");
    Route::resource('bills', 'BillListController');
    Route::get('report/{months}', 'ExcelExportController@months');
    Route::get('reports/{months}/MIS', 'ExcelExportController@mis');
    Route::resource('racks', 'RackController');
    Route::resource('networkmodels', 'NetworkModelController');
    Route::resource('networkdevices', 'NetworkDeviceController');
});
开发者ID:sunhuang2015,项目名称:mytask,代码行数:31,代码来源:routes.php

示例9: 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('/', function () {
    return view('login');
});
Route::get('admin', function () {
    return view('layouts.admin_template');
});
// Master Route
route::resource('kanminvet', 'kanController');
route::resource('babin', 'babinController');
route::resource('kabupaten', 'kabController');
route::resource('provinsi', 'provController');
// Transaction
route::resource('dokumen', 'docController');
开发者ID:AgungNugroho87,项目名称:projek-kemhan-e-filing,代码行数:25,代码来源:routes.php


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