本文整理汇总了PHP中route::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP route::delete方法的具体用法?PHP route::delete怎么用?PHP route::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类route
的用法示例。
在下文中一共展示了route::delete方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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']);
});
示例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 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');
示例3: function
<?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']);
});
示例4: 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']);
});
示例5: function
<?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']);
});
示例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']);
});
示例7: 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('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');
示例8: 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']);
});
示例9: 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']);
});
示例10: 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');
});
});
示例11: function
Route::get('export/{format}', ['middleware' => 'permission:tickets_export', 'as' => 'export', 'uses' => 'TicketsController@export']);
/*
| Create ticket
*/
Route::get('create', ['middleware' => 'permission:tickets_create', 'as' => 'create', 'uses' => 'TicketsController@create']);
Route::post('', ['middleware' => 'permission:tickets_create', 'as' => 'store', 'uses' => 'TicketsController@store']);
/*
| Edit ticket
*/
Route::get('{tickets}/edit', ['middleware' => 'permission:tickets_edit', 'as' => 'edit', 'uses' => 'TicketsController@edit']);
Route::patch('{tickets}', ['middleware' => 'permission:tickets_edit', 'as' => 'update', 'uses' => 'TicketsController@update']);
Route::put('{tickets}', ['middleware' => 'permission:tickets_edit', 'as' => 'update', 'uses' => 'TicketsController@update']);
/*
| Delete ticket
*/
route::delete('/{tickets}', ['middleware' => 'permission:tickets_delete', 'as' => 'destroy', 'uses' => 'TicketsController@destroy']);
/*
| Contact information
*/
Route::group(['prefix' => '{tickets}/update'], function () {
Route::get('{who?}', ['middleware' => 'permission:tickets_edit', 'as' => 'update', 'uses' => 'TicketsController@update']);
});
/*
| Notifications
*/
Route::group(['prefix' => '{tickets}/notify'], function () {
Route::get('{who?}', ['middleware' => 'permission:tickets_edit', 'as' => 'notify', 'uses' => 'TicketsController@notify']);
});
/*
| Edit ticket status
*/