本文整理匯總了PHP中Vendor::destroy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vendor::destroy方法的具體用法?PHP Vendor::destroy怎麽用?PHP Vendor::destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vendor
的用法示例。
在下文中一共展示了Vendor::destroy方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: destroy
public static function destroy($id)
{
self::check_logged_in();
$vendor = new Vendor(array('id' => $id));
$vendor->destroy();
Redirect::to('/vendors', array('message' => 'The vendor has been removed successfully!'));
}
示例2: delete
public function delete()
{
$ids = explode(',', Input::get('javascriptArrayString'));
Vendor::destroy($ids);
$data['status'] = 'success';
$data['message'] = count($ids) . ' Row(s) was deleted successfully';
return Response::json($data);
}
示例3: destroy
/**
* Remove the specified vendor from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
Vendor::destroy($id);
return Redirect::route('vendors.index');
}